Game Development Community

GetMuzzleTransform() wierdness in ShapeBase

by William Todd Scott · in Torque Game Engine · 01/11/2006 (7:15 am) · 3 replies

Hi all,

I am working on an artifact that I am getting when I use the "continuous laser beam" resource. The start point for the laser beam is determined by a call to getMuzzleTransform() to get the correct point on the mounted image to start the beam from. When the player is not moving this works fins, however it seems that when the character is moving, the call to to getMuzzleTransform() returns a transform that is slightly out of sync with the actual position of the node...I don't see why this would be the case.

Has anyone else dealt with this that could give me some hints on why it is happening?

edit: Upon further inspection, it is not that getMuzzleTransform() is randomly out of sync, it is more like it is ahead of the rest of the simulation. So, the starting point of the beam renders where the muzzlePoint is GOING to be rendered, not where it is currently rendering.


Thanks
Todd

#1
01/11/2006 (7:52 am)
Ok,

Luckily for me the guys at GarageGames anticipated my ineptitude and created both a getMuzzleTransform() and getRenderMuzzleTransform(). Using getRenderMuzzleTransform() fixes the problem.

I don't know what they are doing differently, but since I have the GG example, I can go figure it out.

Thanks
Todd
#2
01/11/2006 (9:02 am)
The getXXXTransform() functions return data that is only updated on each simulation tick, and are usually used on server-side for simulation purposes. The getRenderXXXTransform() functions return the transforms that are updated per frame and are used for rendering things at they proper interpolated positions.
#3
01/11/2006 (11:02 am)
Thanks Manoel!

I really appreciate the help. Digging into these functions armed with some knowledge can really be a time saver.

Todd