Page 1 of 1

How do you make a bullet sprite rotate?

PostPosted: Sun Jul 03, 2016 12:45 am
by Calfuso
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?

Re: How do you make a bullet sprite rotate?

PostPosted: Sun Jul 03, 2016 2:47 am
by SoldjahBoy
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

Re: How do you make a bullet sprite rotate?

PostPosted: Sun Jul 03, 2016 10:27 am
by anty21ro
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.

Re: How do you make a bullet sprite rotate?

PostPosted: Sun Jul 03, 2016 11:02 am
by 99Instances2Go
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