Game Development Community

DTS Character Default Orientation

by Steve Lamperti · in Torque Game Engine · 08/14/2007 (10:13 am) · 2 replies

I have a character built in 3DS Max that has a certain default orientation when exported to a DTS file and placed in our Torque engine project. I wanted to change this default orientation by 90 degrees, so I went into 3DS Max, rotated the Bounds box by 90 degrees, and exported to DTS again. This worked fine, with the following exception; When I make the character move, it turns by 90 degrees when it is done with the walking animation, and resumes the idle position.

i.e. it places fine, walks fine, but when the walk is completed, and the animation returns to idle, the character rotates 90 degrees to the left before resuming the idle animation. I guess that this has something to do with the rotation information that is used as the basis of the idle animation, but I don't know what that might be.

If anyone has any suggestions as to what I may be missing I would appreciate it. I think I may just need to rotate one more thing in the 3DS Max file before exporting to DTS, but I am not sure what that would be.

#1
08/17/2007 (5:38 am)
You can change it's Torque orientation using %obj.setTransform("222.2 -725 108.1 0 0 1 180");

222.2 is X coordinate
-725 is Y coordinate
108.1 is Z coordinate
0 0 1 is "not X rotation, not Y rotation, yes Z rotation"
180 is degrees of rotation

You can use the default StudioMax character orientation, and just set it's spawn rotation using code.

Tony
#2
08/17/2007 (9:09 am)
I was trying to change the orientation of the DTS object, but someone already suggested just rotating the object after placing it, and this is working great. (Also a lot simpler then trying to change the orientation of the DTS object.)

Thanks for the suggestion. I was trying to do things the hard way.