Game Development Community

CastRay against collision mesh not bounding box?

by Alain Labrie · in Torque Game Engine Advanced · 11/26/2008 (4:08 pm) · 1 replies

I would like to know if Container::CastRay tests for collision against the bounding box or the collision meshes of an object?

This is what I'm using:

// Code Start

RayInfo rInfo;
Container * currentContainer = &gServerContainer;

U32 mask = StaticShapeObjectType;
bool pass = currentContainer->castRay(pos1, pos2, mask, &rInfo);

// Code end

To me castRay seems to do a bounding box test only. Hope someone can shed some light on this and has a way to do a LOS against the collision meshes of an object.

#1
11/27/2008 (1:01 pm)
I think collideBox do the bounding box test.
CastRay tests against collision meshes.