helloween
15-10-2007 01:43:23
Hi,
I would like to launch a ray on the side of my car constantly, to act as a sensor and get the distance to the side of the track.
How can I specify the direction of the ray ?
So I get the position of the car like this :
Vector3 pos=mCar->getChassisBody()->getOgreNode()->getPosition();
then launch the ray :
BasicRaycast ray(m_World,pos , ???! );
I am not sure , I think I have to use the orientation of the car, and from the quaternion to get the x axis ?
Help me !
Thanks
I would like to launch a ray on the side of my car constantly, to act as a sensor and get the distance to the side of the track.
How can I specify the direction of the ray ?
So I get the position of the car like this :
Vector3 pos=mCar->getChassisBody()->getOgreNode()->getPosition();
then launch the ray :
BasicRaycast ray(m_World,pos , ???! );
I am not sure , I think I have to use the orientation of the car, and from the quaternion to get the x axis ?
Help me !
Thanks