Hello,
When i change the orientation of a entity with either Quaternion::Slerp or SceneNode::rotate(Vector3 axis, Radian angle), they become distorted a bit after a while.
Apparently this problem is due that the finale orientation after the change is not quiet normalize (i suppose the cause is the float numbers).
I resolve the pb with adding a a normalization of the Quaternion after the change of the orientation. But for lots of my entities i do a rotation each frame. So that takes a lot of ressources.
Does anybody have a clue about how to resolve this in a better way ?
[SOLVED] Distorted objects after a while
-
- Halfling
- Posts: 48
- Joined: Wed Mar 01, 2006 10:37 am
[SOLVED] Distorted objects after a while
Last edited by poppu on Thu Jul 13, 2006 10:12 am, edited 1 time in total.
-
- Halfling
- Posts: 48
- Joined: Wed Mar 01, 2006 10:37 am
I suppose i have to use another way to rotate my entities by X degrees each frames rather than using SceneNode::rotate(axis,angle).
It's strange because this problem starts to appear after about 6 hours of rotating. And i just rotate the entity with the function SceneNode::yaw(Angle) and i do nothing to the camera.
Your link doesn't help me but thanx anyway to try to find.
It's strange because this problem starts to appear after about 6 hours of rotating. And i just rotate the entity with the function SceneNode::yaw(Angle) and i do nothing to the camera.
Your link doesn't help me but thanx anyway to try to find.
-
- Goblin
- Posts: 245
- Joined: Mon Nov 22, 2004 11:56 pm
- Location: New York, NY, USA
Without seeing any code, I can only guess, but here goes
Over time, floating point error would make your object's rotation matrix / quaternion become no longer normalized. Quats last longer than rotation matrices in this regard, but six hours may be the limit depending on what you're doing.
Just normalize them every now and again (once an hour or so?)
--Ben

Just normalize them every now and again (once an hour or so?)
--Ben
-
- Halfling
- Posts: 48
- Joined: Wed Mar 01, 2006 10:37 am