Jump to content
  • Advertisement
Sign in to follow this  
fguihen

i can detect collisions, now how do i avoid them?

This topic is 4997 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

i have a simple room made up of simple lines in GDI. my charachter is just a circle. it checks for obstacles in front of it by sending out a probe, which is just a line. when this line intersects another line, i know a collision will occour if i dont deal with it. unfortunately, i have no idea how to do a rotation or anything to avoid the collision so that the charachter tries to go around obstacles and get back on track . hope you understand what i mean. all i can do is change movement from along the x axis to the y axis, so all my charachter does is start moving down when it detects an obstacle, but it is still facing forward, and not in the direction of travel. this is also part of what i need to solve. thanks all

Share this post


Link to post
Share on other sites
Advertisement
If you have no idea how to rotate something, head for the gamedev tutorials. There are many about rotating things in 2D/3D. I would describe it to you, if i had the time. But i have to hurry now...

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!