Jump to content
  • Advertisement
Sign in to follow this  
writtensouls

xna game problem once again pathfinding

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

how do you draw a path from one object to another object and move it to that object? just done a simple line without anything in its way. Is there a built in function like that in xna? Anthony out

Share this post


Link to post
Share on other sites
Advertisement
thanks for the responce actually i thought of how i can do it without that algorithm but i still dont know how. Well there is no objects in the way and my player character roates to move. All I need is for it to rotate to the point then go straight to the point. Not sure how to do that though. how can you rotate to a point then move to the point from another angle with only knowing the point of the objects coordinates? Anthony

Share this post


Link to post
Share on other sites
You use a Vector2 to hold each object's position, right? Subtract those vectors and you'll get the vector that connects them. Have your object follow that vector.

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!