How do I make a Ball Roll/Rotate when pressing the...

Just started using Construct 2? Post your questions here

Post » Tue Jul 21, 2015 9:56 pm

Directional (Left/Right) Buttons? Everything I've tried so far (Rotate Behavior, Physics) doesn't do exactly what I want it to do. I just want the 'Ball/Circle' sprite to start 'Rolling' or 'Rotating' whenever I push Left/Right; and want it to stop when I release the buttons.

EDIT: It's for a side scroller, similar to the game 'Red Ball'.
B
13
S
1
Posts: 63
Reputation: 719

Post » Wed Jul 22, 2015 5:02 am

I'm not sure I'm clear on your question. Would actual rotation (setting the angle) of the sprite work for you needs? Or, do you need an animation (cycling through the sprite sheet) of the sprite rolling while it is moving?
B
29
S
16
G
23
Posts: 68
Reputation: 13,722

Post » Wed Jul 22, 2015 8:25 pm

terrancd wrote:I'm not sure I'm clear on your question. Would actual rotation (setting the angle) of the sprite work for you needs? Or, do you need an animation (cycling through the sprite sheet) of the sprite rolling while it is moving?


Oh no, just to make it 'Roll'...rotate around. As for now, it's just one sprite (a Ball Circle) but in the future it may have multiple sprites.

Ok. I got it working a bit....I used the Set Angle and the formula (self.Angle + 100*dt).

Thanks if I have any other questions, I'll post 8-)
B
13
S
1
Posts: 63
Reputation: 719

Post » Thu Jul 23, 2015 4:36 am

Glad to hear. Good luck on your game!
B
29
S
16
G
23
Posts: 68
Reputation: 13,722


Return to Beginner's Questions

Who is online

Users browsing this forum: No registered users and 2 guests