Jump to content

  • Log In with Google      Sign In   
  • Create Account

Character move to a certain point without hitting the walls


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
6 replies to this topic

#1 Medo3337   Members   -  Reputation: 680

Like
0Likes
Like

Posted 21 June 2012 - 07:14 AM

If I have a character mesh and I want this character to move to a certain point (x, y, z) this point could be the main player, i can do that but the problem is that the character will not takecare about the wall (boundary boxes), so what I want to do is to make the character move to the other point without hitting the walls or colliding with another mesh.

Edited by Medo3337, 21 June 2012 - 07:24 AM.


Sponsor:

#2 Deortuka   Members   -  Reputation: 493

Like
1Likes
Like

Posted 21 June 2012 - 08:07 AM

Sounds like you want to learn about path finding. Here are a few links to get you started:

http://www-cs-students.stanford.edu/~amitp/gameprog.html
http://song-gamedev.blogspot.com/2011/05/been-busy-with-lots-of-stuff-recently.html
http://mobile.tutsplus.com/tutorials/corona/corona-sdk-game-development-path-finding/
http://aigamedev.com/open/tutorial/symmetry-in-pathfinding/
http://www.gamedev.net/page/resources/_/technical/artificial-intelligence/a-pathfinding-for-beginners-r2003

#3 Medo3337   Members   -  Reputation: 680

Like
0Likes
Like

Posted 21 June 2012 - 12:38 PM

Exactly, is there is any article about path finding in DirectX for 3D programming?

#4 FLeBlanc   Crossbones+   -  Reputation: 3117

Like
0Likes
Like

Posted 21 June 2012 - 12:44 PM

Exactly, is there is any article about path finding in DirectX for 3D programming?


Maybe, but irrelevant. It's pointless to be that specific. Pathfinding is pathfinding, regardless of the 3D rendering technology being used. Just check that big list of links to learn what you need to know.

#5 Medo3337   Members   -  Reputation: 680

Like
0Likes
Like

Posted 29 June 2012 - 02:56 AM

I am just looking for one single method to call like the following:

PATHDIRECTION FindPath(D3DXVECTOR3 startPosition, D3DXVECTOR3 targetPosition);

Consider that I will be having other meshes (could be moving as well) and don't want any mesh to collide with the walls or other meshes while moving.

#6 szecs   Members   -  Reputation: 2185

Like
0Likes
Like

Posted 29 June 2012 - 03:42 AM

There's no such DirectX function.
Look at the provided links.

#7 rip-off   Moderators   -  Reputation: 8721

Like
0Likes
Like

Posted 29 June 2012 - 05:37 AM

When dealing with collision, you generally don't go down to the level of mesh data. Generally you have bounding shapes (e.g. bounding spheres, bounding cylinders or bounding boxes, depending on the nature of your game). You can build these bounding shapes from the meshes (e.g. using the maximum vertex position on a given dimension to set the size of the shape)

Thus, the path finding needs to take the start and end position, and this simplified representation of the world and actors. The others are correct, there is nothing DirectX specific about this - just that you happen to be representing positions using DirectX types.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS