How do I constrain Bullet angle to 16 directions

Get help using Construct 2

Post » Wed Apr 22, 2015 3:01 pm

How can I constrain the angle of motion in the Bullet behavior?

I want the object to move in 16 directions instead of 360.
Twitter | Facebook | Instagram

If you play Puyo Puyo games, you can meet me at the Puyo Puyo English Community Discord: https://discord.gg/0k41S8ARwvY2iTIQ
B
103
S
24
G
11
Posts: 696
Reputation: 12,896

Post » Wed Apr 22, 2015 3:33 pm

Have your angle change in 22.5° increment only, and set your initial angle to multiples or 22.5°.
B
69
S
28
G
24
Posts: 977
Reputation: 18,739

Post » Wed Apr 22, 2015 3:41 pm

Depends on how you wanna modify the angle. You can check for multiples or 22.5° with the expression angle%22.5 = 0 (though I am not sure if some problems with float calculations will come up)
Visual Novel 'Engine' in 100 Events
if you ever have to choose between buying Construct 2 on scirra.com or on Steam, read this: Review
B
22
S
9
G
1
Posts: 787
Reputation: 3,786

Post » Wed Apr 22, 2015 11:29 pm

I'll try it, thanks.
Twitter | Facebook | Instagram

If you play Puyo Puyo games, you can meet me at the Puyo Puyo English Community Discord: https://discord.gg/0k41S8ARwvY2iTIQ
B
103
S
24
G
11
Posts: 696
Reputation: 12,896


Return to How do I....?

Who is online

Users browsing this forum: lukewasthefish, Nicolas951, tarek2 and 6 guests