Sign in to follow this  
discodowney

Wall avoidance whiskers things

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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.)

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this