Jump to content

Move camera at a constant speed specified in code


fernthedev

Recommended Posts

So, last time I made a forum post on how to move the camera with a joystick. My best recommendation was interpolation with Minecraft's renderPartialTicks. However, I seem to find an issue where it would randomly make it move faster or slower or just stop completely, though it did accomplish my task even if inefficient. My goal is to make the camera move at a constant speed, non-dependent on the fps while also making it render smoothly. I'm pretty sure Fortnite has done this, allowing players to move the camera at a constant speed (smoother with more fps obviously) How can I do this or achieve something similar.

My code: (currently it is frame-bound in the code)

https://github.com/Fernthedev/controller-remap/blob/5de2c0a5085f0defadf3fc7a3361d9ec83411fc0/mod-core/src/main/java/com/github/fernthedev/controllerremapmod/core/ControllerHandler.java#L380-L42

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.