camera jitter

I have a camera reparented to a model that looks at the model. When the position of the model is close to the origin, the camera tracks the model fine in all three axis. Moving the model to a range of 44000 units produces a camera jitter. This jitter seems to be proportional to the model size.

The models have an absolute size of 0.025 to 19.0 units. Larger models can move farther away from the origin without the effect.

Is it possible this is a variant on floating-point precision issues? See this thread: https://discourse.panda3d.org/viewtopic.php?t=1844

David

Hi David,

Further investigation shows this is indeed the case. To prove it, I placed a camera at a fixed position and then observed the action. The models were jerking about.

Another possible solution would be to periodically transform the points to keep the action near the origin.

My son noticed this same phenomenon in Freelancer a few years ago when he flew his fighter for hours at max speed away from the center of the tactical map.

having a “second” render node is quite helpfull in this case. i’m using this trick myself and it works quite good.every 64 unit’s i create a new “second” render node near the player’s position , reparent all stuff to this node with wrtReparentTo.
this sorta requires you to sorta find a way to store positions of your models relative to the theoretical center of the world.
well if you divide your space into huge cubes with. lets say each one 1000 units side-length and you number them through. then you can easily say keep track of things.

it sorta allows you to have virtually unlimited world-sizes :slight_smile: i think dungeon sidge used the same or at least a simmilar trick.