Jump to content
  • Advertisement
Sign in to follow this  
be17_17y

Path finding on mouse click..??

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

Am I in the right forum ? Sorry to ask you this, now i was trying to make my object moving in 3d environment, the object will move to the point clicked by mouse, -if there is other object in the way, my object will automatically avoiding it and countinue to the point clicked. -if there is other object in the way and blocking all the way, my object will stop move how I'm gonna do to make this ? I have try ask a few people, and the answer always the same : "use store path for the object movement". if i'm using it, isn't my object is not freely move anymore ? or what ? (i'm not really understand in store path) any suggestion ??? [Edited by - be17_17y on June 23, 2005 6:13:18 AM]

Share this post


Link to post
Share on other sites
Advertisement
You would simply use the A* path finding algorithm to see what route to take, or simply to stay still if there's no path to the goal. How you implement A* is the question, since in a 3D environment, you don't have the simple tiles you'd want (unless you're using a heightmap?).
This is where you have to become creative and add some tricks into your engine that allows the map to be routed by hand. You could imagine this as a 3D model being the map, and having a different structure (sort of a spiderweb) covering it. You would use each connectionpoint in the spiderweb as node for your A*.
And yes, this requires some extra programming and/or content creation when creating the map.

By the by, if you could explain what sort of map you're using, a more specific answer would probably pop out. Implementing path finding algorithms are very dependent on the terrain to travel on.

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!