About Store Forum Documentation Contact



Post Reply 
Rotating object: Phys and Mesh out of sync
Author Message
xzessmedia Offline
Member

Post: #16
RE: Rotating object: Phys and Mesh out of sync
Thanks for your quick answer, i will give it a try this evening, but addforce addtorque didnt change anything. Propably addangvel wont work also in this case. Maybe i am doing something wrong with the actor.
Well i didnt add or check the damping.
06-12-2013 06:25 AM
Find all posts by this user Quote this message in a reply
xzessmedia Offline
Member

Post: #17
RE: Rotating object: Phys and Mesh out of sync
thank you this helped me partly, gives me smooth movement by using physics,
the problem seem to be with the actor..

as i have learned i have to sync the actor in the update() by using
actor.matrix(_matrix);

without using actor.matrix in the update loop, the physic body is out of sync with the mesh.. the mesh will be freezed.

when i use actor.matrix(_matrix); everything is freezed ^^
any ideas?
06-12-2013 05:14 PM
Find all posts by this user Quote this message in a reply
Rubeus Offline
Member

Post: #18
RE: Rotating object: Phys and Mesh out of sync
I set actor.matrix( obj.matrix_final ) once in the create function. The trick is to modify the matrix of your object by using only addVel/torque/force/angVel/etc.
Here's what my guess is that is happening: you are modifying the object's matrix at the same time PhysX is modifying the PhysX object's matrix. You have 2 separate sets of modifications at the same time to 2 matrices that are causing the desyncing issue.
So I'd say get rid of your _matrix var, and use the PhysX matrix exclusively, but try not to make modifications directly to it.
06-12-2013 10:25 PM
Find all posts by this user Quote this message in a reply
xzessmedia Offline
Member

Post: #19
RE: Rotating object: Phys and Mesh out of sync
thanks rubeus got it solved... the problem was that i used the wrong matrix..

solved here:
http://www.esenthel.com/community/showth...n=lastpost
06-12-2013 10:28 PM
Find all posts by this user Quote this message in a reply
Post Reply