Wall avoidance whiskers things

Started by
1 comment, last by evren bingol 14 years, 1 month ago
Anyone know how to come up with the side feeler/whiskers things used in wall avoidance in a 3D space. For the main central feeler i have character.getPos() + wallDetectionFeelerLength * character.getVelocity().normalize(); But im not sure how to get the ones at the side. Anyone enlighten me?
Advertisement
The easiest way would probably be to rotate the forward feeler about the up axis by +/- theta, where theta is an angle of your choosing. (The details depend on whether the simulation is 2-d or 3-d, and on what the 'up' axis is considered to be.)
Are you using buckland AI book.

Vector temp = m_pVehicle->Heading();

RotateAroundOrigin(temp, rotateSomeAngle); // this rotates the vector around it self (YAWS the vector)

oneOfSideWisker = charposition->GetPos() + (m_dWallDetectionFeelerLength * temp)

heading is always normaized ofcourse.

If you are controlling a character. use 2D steering and let the physics engine take care of the up/down axis.

This topic is closed to new replies.

Advertisement