Moving a Collision Mesh
by Josh Saulter · in Torque Game Engine · 07/15/2007 (10:40 am) · 2 replies
I have a number of objects that I reposition to match the terrain height as follows:
%xypos = getWord(%obj.position, 0) SPC getWord(%obj.position, 1);
%obj.position = setWord(%obj.position, 2, getTerrainHeight(%xypos));
This moves the objects to the correct positions, but their collision meshes remain at the original coordinates.
Is there a way to automatically translate the collision mesh along with the object and, if not, how would I go about translating the collision meshes? My searching efforts haven't produced any answers, but if someone could point me to the correct documentation or a tutorial, I'd appreciate it. Thanks in advance.
Josh
%xypos = getWord(%obj.position, 0) SPC getWord(%obj.position, 1);
%obj.position = setWord(%obj.position, 2, getTerrainHeight(%xypos));
This moves the objects to the correct positions, but their collision meshes remain at the original coordinates.
Is there a way to automatically translate the collision mesh along with the object and, if not, how would I go about translating the collision meshes? My searching efforts haven't produced any answers, but if someone could point me to the correct documentation or a tutorial, I'd appreciate it. Thanks in advance.
Josh
Torque 3D Owner Stephen Zepp