How do I: trying to decelerate my roulette

Get help using Construct 2

Post » Tue Jun 07, 2016 8:07 am

I'm trying to make a roulette that decelerates at a given angle of rotation. However, I can only find acceleration in the behavior of rotate.
I've tried adding velocity and acceleration in the instance variable of roulette sprite, but it seems to be not working. HALP!
B
4
S
1
Posts: 7
Reputation: 314

Post » Tue Jun 07, 2016 8:36 am

sherlykim wrote:... I can only find acceleration in the behavior of rotate....


and if you use negative values for acceleration ?

Image

also..
How do I make a random spining wheel?
B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072

Post » Tue Jun 07, 2016 8:55 am

I tried negative acceleration and somehow, at the endpoint, the roulette sprite starts to rotate to the other direction. :(
B
4
S
1
Posts: 7
Reputation: 314

Post » Tue Jun 07, 2016 9:27 am

B
67
S
24
G
7
Posts: 1,518
Reputation: 11,072

Post » Tue Jun 07, 2016 10:31 am

sherlykim wrote:I tried negative acceleration and somehow, at the endpoint, the roulette sprite starts to rotate to the other direction. :(

Try using clamp to stop it going too far:

clamp(x, lower, upper)
Return lower if x is less than lower, upper if x is greater than upper, else return x.

https://www.scirra.com/manual/126/system-expressions
B
41
S
12
G
14
Posts: 1,122
Reputation: 11,282


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 35 guests