Game Development Community

setTransform only updates position and not rotation

by Adam Beer · in Torque 3D Professional · 10/30/2009 (2:53 pm) · 7 replies

I am using a custom vehicle class that is not based off of the default torque vehicles. It is an aircraft class and it has been completely custom written. It is not based off of Rigid it uses its own physics. My problem is I cant get setTransform to update its rotation. It will set the position correctly, but the rotation stays the same as it was before setTransform was called. Does anyone have any idea as to what might cause this? If you would like to see the code, please email me as this isnt something I can publicly display. If you are able to fix it I would like to reward that person.

Email - abeer@ignition-games.com

Thanks,
Adam

#1
10/31/2009 (3:26 am)
What is your custom vehicle diverted from ? It should at least be diverted from the vehicle class to update it's proper rotation.
#2
10/31/2009 (5:40 pm)
It is derived from shapeBase.

Edit - I have a feeling that in either the updateMove or processTick it is saving the rotation and canceling out the setTransform calls. Problem is, I wouldnt know where to look.
#3
10/31/2009 (9:16 pm)
Without knowing the extent of your changes, it's hard to pinpoint the problem. Does your class overrides setTransform()? Do you still use the Rigid struct? Make sure to apply rotations sent from setTransform to the rigid, since it pretty much controls the simulation.
#4
11/01/2009 (12:08 pm)
Ron Nelson and I have rewritten the vehicle and wheeled vehicle classes to use bullet instead of Rigid, no problems with rotations,

like Manoel says, need more input...
#5
11/01/2009 (12:16 pm)
Ron fixed this last night for me. Thanks for the reply's guys.
#6
11/01/2009 (12:56 pm)
awesome!!
#7
06/08/2013 (11:01 pm)
An Answer to how this was fixed would have been nice for those of us who have the same problem. cheers Bob