rigidbodies in motion jitter when camera is moving

In my VR FPS, the camera is attached to the players rigidbody, which is moved by physics forces in FixedUpdate().

my framerate is 90FPS and my physics timestep is 0.01.

when the player is in motion, grenades which are in motion jitter. If the player is standing still and throws the grenade, the grenade moves smoothly. Only when both the player and the grenades are in motion, do the grenades seem to stutter.

the grenade rigidbody is given a velocity (not a force) upon release, in a single frame.
the player’s rigidbody is set to interpolate, non-kinematic.
the grenades rigidbody is set to interpolate, non-kinematic.

Please let me know if you have some insight, a video can be provided if the explanation is not clear, thank you!

Camera is attached through script or in the inspector?

Try to write a simple script for camera which sets its position to player position + offset in FixedUpdate

1 Like

Move camera in LateUpdate

3 Likes

Dude, that did the trick, thank you :slight_smile: I guess it was important to wait until after physics calculations were done to move the camera?

Hi we issue the same problem. But we already put the camera in LateUpdate but it didn’t worked out.
Sorry I’m a bit confused now which one could work out for us (I’m just the graphics guy so not very experienced with the coding)

Thanks for tips!!!
Regards
Rolf

If your player moves with physics, your camera should move in FixedUpdate.

Longer explanation at the end of this article.

Try putting everything in FixedUpdate, and then customizing execution order by calling one function from within another. Hope that makes sense.

hey am a trying to use interpolate with rotation on a 2d platformer any help