Path finding on mouse click..??
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]
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement