Game Development Community

Parallel raycasts

by Bristow · in Torque Game Engine · 08/21/2006 (6:09 pm) · 0 replies

I want to make an inital raycast, and then create another raycast the same length parallel to the first.




for reference the reason I can't just manaually make it parallel is because it's for line of site, so where the first line is made is based on the bots line of site


%searchMasks = ($TypeMasks::playerObjectType | $TypeMasks::StaticObjectType
| $TypeMasks::InteriorObjectType ); 
     %startPoint = %this.getEyeTransform ();    
    %eyeVector = %this.getEyeVector();   
     %eyeVec = VectorScale ( %eyeVector, 60 );    
     %endPoint = VectorAdd ( %startPoint, %eyeVec );
    %scanTarg = ContainerRayCast (%startpoint, %endpoint, %searchMasks, %this);