How do I rotate object without changing angle

Get help using Construct 2

Post » Fri Oct 02, 2015 1:23 am

I gave an object the rotate behavior but when i play the game the object rotates on a weird axis. Basically i juist want the sprite to rotate, but the entire object is moving in a big circle. Whats going on?
B
6
Posts: 46
Reputation: 342

Post » Fri Oct 02, 2015 6:12 am

Do you have the behavior bullet and rotate on the same sprite? If so bullet will move at the rotation angle.
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,614

Post » Fri Oct 02, 2015 6:30 am

The most common cause of that behavior would be if the origin point of your sprite is placed outside the object. If that is the case all you need to do is to center it.
B
10
S
3
G
1
Posts: 14
Reputation: 809

Post » Fri Oct 02, 2015 2:56 pm

Silverforce wrote:Do you have the behavior bullet and rotate on the same sprite? If so bullet will move at the rotation angle.


Yes they're on the same sprite because i want the bullet object's sprite to rotate.
B
6
Posts: 46
Reputation: 342

Post » Fri Oct 02, 2015 2:57 pm

hellando wrote:The most common cause of that behavior would be if the origin point of your sprite is placed outside the object. If that is the case all you need to do is to center it.

The origin point is centered.
B
6
Posts: 46
Reputation: 342

Post » Fri Oct 02, 2015 10:38 pm

You could try to use 2 separate sprites, one with the rotate behavior and the other with the bullet behavior. Pin the rotating sprite to the bullet sprite and make the the bullet sprite invisible.
B
14
S
7
G
3
Posts: 145
Reputation: 3,035

Post » Sat Oct 03, 2015 12:28 am

Ne7herM0St wrote:
Silverforce wrote:Do you have the behavior bullet and rotate on the same sprite? If so bullet will move at the rotation angle.


Yes they're on the same sprite because i want the bullet object's sprite to rotate.


If you use both and want that effect, you have to go to the Bullet properties of the sprite and on Use Angle of Motion, turn it off.

The bullet will then spin with rotation but it won't change its course, it will fly straight.
B
70
S
24
G
19
Posts: 1,757
Reputation: 17,614


Return to How do I....?

Who is online

Users browsing this forum: Rudi55 and 5 guests