How do I maintain the angle of motion

Get help using Construct 2

Post » Tue Feb 07, 2017 1:36 pm

Hi,

I'm using the 8 directional movement behaviour and all works well as the piece moves and rotates as you'd expect. However, once I stop moving it resets the angle of the sprite to the nearest 90 degree (0,90,180,270) - Is there a way to stop this please ?

Thanks

Ian
B
8
S
3
Posts: 12
Reputation: 626

Post » Tue Feb 07, 2017 1:54 pm

In the 8 Direction Behaviors you can set SET ANGLE to No or to angle you are using.
Banned User
B
23
S
6
G
58
Posts: 1,229
Reputation: 34,540

Post » Tue Feb 07, 2017 5:11 pm

Hi Lamar,

Thanks for the reply. Setting the angle to no means that it doesn't rotate at all, which is not what I'm after. I want it to rotate, using 360 smooth, and then to stay facing the angle it's in when I let go of the keys. Instead, it just returns to the nearest 90 degree angle.

Is there a way to move in 360 degrees, but keep that angle when stopped please ?

Thanks.
B
8
S
3
Posts: 12
Reputation: 626

Post » Tue Feb 07, 2017 5:18 pm

Try setting "set angle" to no and making an event:

Sprite: 8direction: is moving
--- sprite: set angle to sprite.8direction.angleOfMotion
B
91
S
31
G
103
Posts: 5,235
Reputation: 67,756

Post » Tue Feb 07, 2017 5:31 pm

hypnorabbit wrote:Hi Lamar,

Thanks for the reply. Setting the angle to no means that it doesn't rotate at all, which is not what I'm after. I want it to rotate, using 360 smooth, and then to stay facing the angle it's in when I let go of the keys. Instead, it just returns to the nearest 90 degree angle.

Is there a way to move in 360 degrees, but keep that angle when stopped please ?

Thanks.


I should have asked you if it is a car like sprite.

See ROJOhound comment. That should take care of it.
Banned User
B
23
S
6
G
58
Posts: 1,229
Reputation: 34,540

Post » Tue Feb 07, 2017 5:39 pm

Doesn't seem to work either I'm afraid Rojo. I've posted a capx here:

http://gothamvillage*co*uk/Construct2/N ... ect.caproj

Which shows it going back to a right angle.

Obviously replace the * with . to get to the URL :)
B
8
S
3
Posts: 12
Reputation: 626


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 8 guests