Pathfinding challenge

Chat about anything not covered in these forums, but keep it civil!

Post » Sat Oct 12, 2013 12:42 am

I'm having these challenges implementing pathfinding in my game.

The first challenge is on choosing the point i want my player to move to, it rotates sides ways where as i just want it to move in that direction with the front, or turn its fron to that direction and move towards it, however i cant get that done.

Also, i want to start the run animation only when it is about to move and keep it standing alone when not moving
Link below
pathfinding test
B
15
S
4
Posts: 138
Reputation: 2,003

Post » Sat Oct 12, 2013 3:56 pm

what I want is path that are one direction rather than just path cost
B
40
S
11
G
7
Posts: 514
Reputation: 9,636

Post » Sat Oct 12, 2013 5:14 pm

Make a 3 piece rig... one for the legs, and one for the arms and head and one for the collision sprite.

spawn collision sprite.
spawn legs sprite +pin to collision sprite
spawn arms and head sprite +pin to collision sprite.

Use the collision sprite for your AI's movement routine. (give it the pathfinding behaviour if you re using pathfinding)

use the arms and head sprite as a turret. (give it a turret behaviour if you want to make it easy.

The legs are there just for the visuals.

not going to be perfect, but this will get you going. I would make my own turret routine, but the pathfinding AI seems to work really nice, so I would keep that.
B
29
S
8
G
4
Posts: 767
Reputation: 5,985

Post » Sat Oct 12, 2013 7:26 pm

@jojoe thanks a lot, already found a way around but wld try your approach too
B
15
S
4
Posts: 138
Reputation: 2,003

Post » Sat Oct 12, 2013 7:38 pm

And you probably figured it out by now, but the front of a sprite is facing right. (Angle 0)

(I fixed the "side walk" in your example by opening the Animation editor editor and while holding shift, to affect all frames, clicked rotate Clockwise.)Paradox2013-10-12 19:40:43
B
226
S
60
G
33
Posts: 902
Reputation: 39,989

Post » Sat Oct 12, 2013 7:45 pm

@ paradox :) thanks anyway
B
15
S
4
Posts: 138
Reputation: 2,003


Return to Open Topic

Who is online

Users browsing this forum: Armontiiago and 4 guests