Game Development Community

T3D 1.1 Pro - TSMesh::castRayRendered triangle iteration error - LOGGED (THREED-3154)

by Adam Files · in Torque 3D Professional · 12/13/2011 (10:47 am) · 2 replies

When using the castRayRendered function of a TSMesh, when iterating through triangle primitives, as seen below, the increment of j (j++), should be j += 3. The next triangle of the list does not share any verts when stored in this format.

This happens around line 768.

// gonna depend on what kind of primitive it is...
   if ( (draw.matIndex & TSDrawPrimitive::TypeMask) == TSDrawPrimitive::Triangles )
      {
         for ( S32 j = 0; j < draw.numElements - 2; j++)
         {
//etc

About the author

Recent Threads


#1
12/17/2011 (2:54 am)
Nice catch!
#2
01/11/2012 (11:28 am)
Thanks Adam for the bug report. I've gone ahead and logged this issue under ticket number THREED-3154 for review.