Amnuriak
19-04-2010 14:14:18
How do I turn an actor ? Just yaw/pitch/whatever it.
I was able to "tilt" the actor but not in any way I could comprehend. I'm not trying to make it face a certain point, I only want the actor to turn (given a quat). I figured the Actor::get/setGlobalOrientation/Pose/etc. methods would do the trick but I get the strangest behaviour. Calls to Actor::setGlobalOrientationQuat will even deform the actor - sometimes. Now THAT's something I didn't expect.
If I call Actor::getGlobalOrientationQuat on a newly created Actor it will return w=1, x=0, y=, z=0. Hu ? What does this mean ? It's facing ... nowhere ? Out of curiosity I did setGlobalOrientation(0, 0, 0, 0) which caused the actor to keep falling INTO the underlying plane and reset to its initial position again and again and again and ...
I have to admit I'm not a quaternion expert but I think I understood how they are used. And I certainley did not expect them to deform the object in question.
Actor::getGlobalPose() "Retrieves the actors world space transform. " (Nx doc) so multiplying it with some quat (like Quat(10, 0, 1, 1)) and assign it to should do something. Well, at least I figured so and I figured wrong cause it will not do anything at all. Actor stays perfectly the same.
Some help with this please.
I was able to "tilt" the actor but not in any way I could comprehend. I'm not trying to make it face a certain point, I only want the actor to turn (given a quat). I figured the Actor::get/setGlobalOrientation/Pose/etc. methods would do the trick but I get the strangest behaviour. Calls to Actor::setGlobalOrientationQuat will even deform the actor - sometimes. Now THAT's something I didn't expect.
If I call Actor::getGlobalOrientationQuat on a newly created Actor it will return w=1, x=0, y=, z=0. Hu ? What does this mean ? It's facing ... nowhere ? Out of curiosity I did setGlobalOrientation(0, 0, 0, 0) which caused the actor to keep falling INTO the underlying plane and reset to its initial position again and again and again and ...
I have to admit I'm not a quaternion expert but I think I understood how they are used. And I certainley did not expect them to deform the object in question.
Actor::getGlobalPose() "Retrieves the actors world space transform. " (Nx doc) so multiplying it with some quat (like Quat(10, 0, 1, 1)) and assign it to should do something. Well, at least I figured so and I figured wrong cause it will not do anything at all. Actor stays perfectly the same.
Some help with this please.