Set Angle of Bullet

Get help using Construct 2

Post » Wed Aug 01, 2012 12:42 pm

Hello,
I'm trying to play around with the properties of the bullet function. I'm trying to make it so that it simply rotates the bullet modifier but not the sprite. I understand that you can set angle of the bullet separately but where as when you are setting the angle of a sprite you can set its angle towards two points, you can only set the bullet towards one point. I have been racking my brain trying to make it go towards an X,Y position but am not having much luck.

I hope I have been clear enough. I'm trying to create side-on RTS(style) movement, for which I don't want the sprites to angle towards the point, because they turn upside down at certain points.

Regards,
Ian

B
5
Posts: 8
Reputation: 417

Post » Wed Aug 01, 2012 12:47 pm

So you need to do a "Set angle towards position" with bullet angle of motion? Use the "Set bullet angle of motion" action and the angle expression:

angle(Bullet.X, Bullet.Y, Target.X, Target.Y)
B
27
S
8
G
8
Posts: 903
Reputation: 8,452

Post » Wed Aug 01, 2012 1:18 pm

Ah the expression was the thing I was struggling with. Thank you very much, I understand what I was doing wrong now.

Regards,
Ian
B
5
Posts: 8
Reputation: 417


Return to How do I....?

Who is online

Users browsing this forum: spacedoubt and 2 guests