Jump to content
  • Advertisement
Sign in to follow this  
discodowney

Wall avoidance whiskers things

This topic is 3054 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
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.)

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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!