Game Development Community

DTS Renderable triangles

by Gerald Fishel · in Torque Game Engine · 09/28/2005 (6:14 pm) · 2 replies

Hi all,

Well I thought I had this figured out previously, but it looks like I was probably mistaken.

I'm trying to implement a castray against DTS objects using the actual renderable triangles rather than the collision mesh. I have a ray/triangle intersect function that works well, but I need to be able to get a complete list of the renderable triangles to perform the collision tests. How can I get that?

I was using 'TSMesh::buildPolyList' from within TSMesh::castRay, but I don't seem to be getting all of the triangles. When TSMesh::castRay is called normally, does the TSMesh just represent the collision mesh?

Any help on figuring out this issue would be greatly appreciated.

Best Regards,
Gerald

#1
09/28/2005 (10:33 pm)
I got it figured out. Since I only need to do this in 1 case where performance isn't critical (object selection), I created a function like ContainerRayCast (ContainerRayCast2) with a new castRay pipeline (castRay2) that does the ray/polygon collision. Apparently in TSShapeInstance::castRay its ignoring the mesh object with the renderable polys.

Thanks
#2
10/02/2005 (11:10 pm)
Thanks for the followup!