How do you make a bullet sprite rotate?

Get help using Construct 2

Post » Sun Jul 03, 2016 12:45 am

Becuase when you give a sprite the bullet behavior and the rotate behavior it only rotates and doesn't move like a bullet sprite usually does. So how do you solve it?
B
12
S
2
Posts: 267
Reputation: 1,344

Post » Sun Jul 03, 2016 2:47 am

What exactly are you trying to make happen? Do you want a bullet that flies straight but looks like it's "spinning" or do you want the bullet to actually curve through the air?

Typically, if you want something to appear like it's spinning, you're better off making an animation sequence for your object so it's "spinning" via animation - then you can just shoot it like a bullet in a straight line. If you want it the curve through the air, you're better off just adjusting the angle of the object using events (like every tick, bullet.angle=bullet.angle+0.1)

Hope this helps

~Sol
Tired of crappy file hosts that are crappy? Get DROPBOX - https://db.tt/uwjysXJF
Moderator
B
84
S
34
G
40
Posts: 3,032
Reputation: 30,499

Post » Sun Jul 03, 2016 10:27 am

You can make an invisible box to have the bullet behavior, pin the bullet sprite to it and add the rotate behavior to the bullet sprite. And you can use containers to make the job easier.
B
41
S
10
G
9
Posts: 213
Reputation: 7,089

Post » Sun Jul 03, 2016 11:02 am

The options ...

Set Angle in the Bullet behavior on/off combined with:
Rotate by changing the self.angle
Rotate by changing the self.Bullet.AngleOfMotion
Rotate by the behavior.

https://www.dropbox.com/s/g27wmouy2jh7w ... .capx?dl=0
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 4 guests