Sign in to follow this  
Medo Mex

Character move to a certain point without hitting the walls

Recommended Posts

Medo Mex    891
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

Share this post


Link to post
Share on other sites
alexisgreene    499
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

Share this post


Link to post
Share on other sites
FLeBlanc    3141
[quote name='Medo3337' timestamp='1340303888' post='4951450']
Exactly, is there is any article about path finding in DirectX for 3D programming?
[/quote]

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.

Share this post


Link to post
Share on other sites
Medo Mex    891
I am just looking for one single method to call like the following:

[CODE]PATHDIRECTION FindPath(D3DXVECTOR3 startPosition, D3DXVECTOR3 targetPosition);[/CODE]

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.

Share this post


Link to post
Share on other sites
rip-off    10976
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this