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
11
S
2
Posts: 262
Reputation: 1,309

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
80
S
34
G
40
Posts: 3,029
Reputation: 30,393

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
35
S
9
G
9
Posts: 207
Reputation: 6,805

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
27
Posts: 2,451
Reputation: 20,366


Return to How do I....?

Who is online

Users browsing this forum: Manubis, Ryan Kocourek, TheSupreme, TylerJS and 9 guests