Milryth
25-07-2007 02:47:50
Hi,
I have a simplified polygon that I'm using for collision detection, which uses a much more complex mesh on top for display. The problem is, the mesh is displaced from where the collision shape is located. It seems to be consistently lower than the actual collision shape. I'm trying to offset the mesh so that it lines up correctly with the collision shape, but I'm not having any success. I've tried moving the scene node, but I don't think that's the way to go given some of the forum posts I've seen. Anyone have any tips? Is it a problem with the mesh model, or is there a way to fix it in the code? Also, the mesh needs to rotate correctly along with the collision shape, so that's why I'm more concerned as to the reason why this happening (i.e. if I simply offset the mesh in the y direction, and the actor rotates, the mesh might pivot around the wrong point while the collision shape pivots correctly, thus misaligning the mesh and collision shape).
Thanks for any help.
I have a simplified polygon that I'm using for collision detection, which uses a much more complex mesh on top for display. The problem is, the mesh is displaced from where the collision shape is located. It seems to be consistently lower than the actual collision shape. I'm trying to offset the mesh so that it lines up correctly with the collision shape, but I'm not having any success. I've tried moving the scene node, but I don't think that's the way to go given some of the forum posts I've seen. Anyone have any tips? Is it a problem with the mesh model, or is there a way to fix it in the code? Also, the mesh needs to rotate correctly along with the collision shape, so that's why I'm more concerned as to the reason why this happening (i.e. if I simply offset the mesh in the y direction, and the actor rotates, the mesh might pivot around the wrong point while the collision shape pivots correctly, thus misaligning the mesh and collision shape).
Thanks for any help.