- Home /
Objects close to camera jittering a few 1000 units away from origin
In my project, weapons are stored as children of the player's camera. This system works fine, but when the player moves out to around 2000 units from the origin, the weapons starts to jitter slightly. I believe this is due to error in floating point calculations, because the weapon is so close to the camera. Is there a way to fix this? I am not setting the weapon's position in any way. The effect is aggravated when the player looks around, and Unity does calculations to move the weapon as the camera's child. The jittering is visible even when the player is stationary. When I move out to around 20k units the weapon begins to go crazy. Again I am not moving the weapon by any script when this occurs.
Your answer
Follow this Question
Related Questions
How do I add something on to a float. 1 Answer
Smooth Follow Camera that Keeps Up 0 Answers
[RESOLVED] Raycast - Calculate Angular Difference from Object 3 Answers
Vector3(x,y,variable)? 0 Answers
Cannot modify a value type return value of `UnityEngine.Transform.position'. Can anyone help ? 1 Answer