Compare the angle of motion?

Get help using Construct 2

Post » Tue Sep 17, 2013 10:51 pm

Hi

Does anyone know how to compare the angle of motion of a sprite that does not rotate with the angle of motion? I can see "is angle within" etc but this seems to only look at the angle of the sprite itself and not its motion.

Thanks

MB
B
4
Posts: 4
Reputation: 285

Post » Tue Sep 17, 2013 11:10 pm

If you are using the bullet behaviour, it has it's own angle property. You can use two sprites for the object, one invisible box and one sprite. Then pin them (only position), give bullet behaviour to invisible object, then compare bullet.angle to sprite.angle. Obviously, you will have to handle rotation of the sprite with other events that don't rely on bullet behaviours events & properties.

Please forgive I am not very good either, but this is the first thing that came to my mind.
B
18
S
4
G
1
Posts: 332
Reputation: 3,149

Post » Thu Sep 19, 2013 4:29 pm

Thanks for the suggestion. I will give this a try, sounds like it will work. I though of some similar convoluted solutions but figured that I must have missed an obvious value to check somewhere.
B
4
Posts: 4
Reputation: 285

Post » Thu Sep 19, 2013 5:33 pm

Easier option is to use bullet behaviors angle of motion. You can access it this way in expression: object.bullet.angleofmotion
B
24
S
9
G
7
Posts: 756
Reputation: 7,312


Return to How do I....?

Who is online

Users browsing this forum: mindragon73 and 27 guests