Pathfinding problem. Found Workaround

Get help using Construct 2

Post » Thu May 23, 2013 2:03 am

I have a sprite follow a path then stop and rotate then stop rotating. afterward i have the same sprite move forward then find path and follow. the problem happens right when the sprite follows the new path. it glitches back to the same angle it was last pathfinding at then turns around and begins on its new path. How can I make it not revert back to the angle it was at the last time if was pathfinding? thanks for any help folks.KickAHobo2013-05-23 21:32:54
B
4
Posts: 17
Reputation: 234

Post » Thu May 23, 2013 5:53 pm

Bump anyone?KickAHobo2013-05-23 17:53:55
B
4
Posts: 17
Reputation: 234

Post » Thu May 23, 2013 6:08 pm

Post a capx?
B
57
S
20
G
7
Posts: 305
Reputation: 8,779

Post » Thu May 23, 2013 8:51 pm

Ok i have made some progress and I determined that the pathfinding behavior saves the angle that the sprite is moving at. when the sprite arrives at the end of the path and begins to rotate its (pathfinding) "moveangle" does not stay updated to the current "sprite.angle". so when the sprite has to find a new path it starts its path at the last (pathfinding)"moveangle". my problem now is how to change the "sprit.moveangle".
B
4
Posts: 17
Reputation: 234

Post » Thu May 23, 2013 9:31 pm

Update:
      I found a workaround. if I give the sprite a path then set Accel and Deccel to 0 it will turn almost completely toward the angle but not move forward or back. the "sprite.movingangle" will be as desired.

Condition: Blah Blah. Action: Sprite-> Set (path) Acceleration to 0
                      Action: Sprite-> Set (path) Deceleration to 0
                      Action: Sprite-> Set (Path) Rotate Speed to X
                      Action: Sprite-> Find path to (X,Y)
                      Action: Sprite-> Move along path

Hope it helps anyone else who needs it.
B
4
Posts: 17
Reputation: 234


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, Artpunk, indiegrimes, NRABrazil, PixelatedTrip and 25 guests