GetRenderMountTransform weirdness
by Daniel Buckmaster · in Torque Game Engine · 09/01/2007 (2:06 am) · 0 replies
I've made a class that will mount to objects using its mountPoint node, like ShapeBaseImages do. When I use the console to mountObject it to the Player, it works like a charm. However, when I call mountObject in script, it gets all screwed up. I tracked the call down to the object's interpolateTick call to getRenderMountTransform, called on its mMount.Object. When I mount using the console, this call returns accurately. However, when I mount from script, this call gives a really odd value that results in my object being hung above the terrain hundreds of metres away, flickering up and down horribly. In addition, the actual position of the object isn't changed - the editor shows it still on the ground where I picked it up, and I can manipulate it as usual. Only the render position is stuffed, not the normal position as updated by pocessTick.
I think the problem is in getRenderMountTransform, but I can't see how on earth I could be breaking it simply by calling the function from script.
EDIT: Okay, please ignore this thread. I just found out that the problem is actually something totally different, but just as wierd. My script function was calling mountObject on some other object. Very wierd. But this leads to a whole load of new questions, such as why was my target still affected even though I wasn't calling anything on it? Maybe there's something going on serverside versus clientside here...
I think the problem is in getRenderMountTransform, but I can't see how on earth I could be breaking it simply by calling the function from script.
EDIT: Okay, please ignore this thread. I just found out that the problem is actually something totally different, but just as wierd. My script function was calling mountObject on some other object. Very wierd. But this leads to a whole load of new questions, such as why was my target still affected even though I wasn't calling anything on it? Maybe there's something going on serverside versus clientside here...
About the author
Studying mechatronic engineering and computer science at the University of Sydney. Game development is probably my most time-consuming hobby!