# Bullet's angle of motion ?

Get help using Construct 2

### » Wed May 07, 2014 7:34 pm

I have an object (sprite) that moves in different directions using the Bullet behavior. I want to change object's animation based on the angle of motion. As far I can see, the Bullet behavior does not use 360 degrees...

So how do I calculate Bullet's angle of motion ?
B
49
S
15
G
6
Posts: 540
Reputation: 7,207

### » Wed May 07, 2014 10:20 pm

The value you get from the bullet's angle of motion expression is in the range of -180 to 180, which still is a range of 360 degrees and still works with most all angle ACEs. If you want to convert it to the range of 0-360 do this:
Code: Select all
`(ang + 360)%360`
B
98
S
36
G
132
Posts: 5,521
Reputation: 84,005

### » Wed May 07, 2014 10:40 pm

@R0J0hound
Thanks, after playing a little in debug mode, I noticed that after 180 degrees it goes to negative values. Also thank you very much for the formula. This should be specified in the manual because is very useful
B
49
S
15
G
6
Posts: 540
Reputation: 7,207

### » Sat Jun 07, 2014 1:59 am

Thanks for the reply - Really needed that...
B
4
Posts: 2
Reputation: 204

### » Mon Sep 01, 2014 2:17 pm

Thanks for the formula. !
B
9
S
3
G
1
Posts: 23
Reputation: 828