How do I make enemies pathfind in only 4 directions?

Get help using Construct 2

Post » Sun Oct 02, 2016 4:12 pm

Hi there! So I have set up a pathfinding algorithm for enemies which follow specific paths. However, I only want to set their angle to 0, 90, 180 and 270. Is there a way to do this, ie force the enemy sprites to set angle to only 90, 180 270 and 360 according to its pathfind's general direction? Thanks in advance for any help! :D

NOTE: I have tried rounding the angles in every tick, although there are always small jitters and zigzags in the "straight" path, which causes the enemies' angles to not be set to its general direction.
B
18
S
6
Posts: 33
Reputation: 1,263

Post » Sun Oct 02, 2016 4:16 pm

Yeah under pathfinding behaviour if you disable Diagonals then they should just use those angles.
B
46
S
16
G
78
Posts: 2,168
Reputation: 46,353

Post » Sun Oct 02, 2016 5:29 pm

plinkie wrote:Yeah under pathfinding behaviour if you disable Diagonals then they should just use those angles.


Thanks for the reply, @plinkie ! However, when I tried that, the angle of movement is not at the 4 degrees intended.
B
18
S
6
Posts: 33
Reputation: 1,263


Return to How do I....?

Who is online

Users browsing this forum: Microbex, PROxMTswatTR and 19 guests