Getting UV coords from a Point3F in object space?
by Stefan Beffy Moises · in Torque Game Engine · 08/15/2006 (6:27 am) · 0 replies
Hi there,
I'm having a little problem getting the UV coordinates of a TSMesh (TSMesh::SkinMeshType)...
I am using code from this resource to do a raycast against the object when its hit by a projectile, but the UV coords dont seem to be correct for all shapes and at all times... it doesnt work at all for the default player Orc, and for some custom player shapes I have it only works sometimes...
I need those coordinates to blend another texture onto the shape texture at the hit location.
Is there an easy and reliable way to get the UV texture coords at any given point on a shape?
castRayTri() from the resource fails sometimes and for some shapes, it looks like getBarrycentricCoord() / getArea() used in that resource don't return valid triangles for some shapes / in all cases...
Thanks!
I'm having a little problem getting the UV coordinates of a TSMesh (TSMesh::SkinMeshType)...
I am using code from this resource to do a raycast against the object when its hit by a projectile, but the UV coords dont seem to be correct for all shapes and at all times... it doesnt work at all for the default player Orc, and for some custom player shapes I have it only works sometimes...
I need those coordinates to blend another texture onto the shape texture at the hit location.
Is there an easy and reliable way to get the UV texture coords at any given point on a shape?
castRayTri() from the resource fails sometimes and for some shapes, it looks like getBarrycentricCoord() / getArea() used in that resource don't return valid triangles for some shapes / in all cases...
Thanks!
About the author