Game Development Community

How do you rotate mounted objects?

by Ryan Mick · in Torque Game Engine · 12/08/2004 (7:16 pm) · 4 replies

I have a staticshape object that mounts another staticshape object and I want to rotate the mounted object at the mount point. I see the function getSlotTransformation but don't see a setslot transformation. I know there has to be a way to rotate a mounted object but have not been able to find anything in the forums. ANy help would be greratly appreciated.

#1
12/10/2004 (6:28 am)
Just shooting in the wind here ( at work so can't test anything )... but I'd think you could make it a shape rather than a static shape, then apply a setTransform to the object itself... the one thats mounted...

again just throwing an idea out there
#2
12/10/2004 (6:53 am)
Ryan, you could always add the setSlotTransformation function in the appropriate place, which would expose it to script for you...
#3
12/10/2004 (8:08 am)
There's a resource on adding Turrets to things (like tanks) that might help,
#4
12/13/2004 (2:49 pm)
Thanks for the replies, sorry it has taken so long for me to respond. I looked at the turret resource and that was a lot more than I was trying to do. I have learned that when an object rotates on a node that any collision meshes do not follow. So I need to look at the setTransform method and determine why standard transformations moves the collision meshes and then compare that to the methods that transform objects mounted to a node.

I will admit that I have very little experience with c++ and I am very new to the Torque engine, so any help in this endeavor would be appreciated. I would have expected the collosion mesh to be updated along with it's parent object. Could this possibly be a bug?