jnhltmn Posted March 10, 2021 Share Posted March 10, 2021 I want to make a sort of wheel of fortune. But the wheel is now stopping too quickly. Is it possible to change (double?) the Momentum-based animation of the wheel causing the object to glide gracefully to a stop? There is no friction property, is it? I hope there is a simple solution. :) See the Pen RwoqoKV by jnhltmn (@jnhltmn) on CodePen Link to comment Share on other sites More sharing options...
PointC Posted March 10, 2021 Share Posted March 10, 2021 You could look at: throwResistance : Number - A number (1000 by default) that controls how much resistance or friction there is when the mouse/touch is released and momentum-based motion is enabled (by setting inertia: true). The larger the number, the more resistance and the quicker the motion decelerates. (requires InertiaPlugin and setting inertia: true, otherwise throwResistance will simply be ignored.) Or maybe just set a minimum duration if you feel it's stopping too quickly. That's a super simple fix. minDuration : Number - The minimum duration (in seconds) that the kinetic-based inertia tween should last. InertiaPlugin will automatically analyze the velocity and bounds and determine an appropriate duration (faster movements would typically result in longer tweens to decelerate), but you can force the tween to take at least a certain amount of time by defining a minDuration. The default is 0.2 seconds. This has nothing to do with the minimum amount of time that the user can drag the object - it’s only the inertia tween that results after they release the mouse/touch. (requires InertiaPlugin and setting inertia: true, otherwise minDuration will simply be ignored.) Does that help? Happy tweening. 2 Link to comment Share on other sites More sharing options...
ZachSaucier Posted March 10, 2021 Share Posted March 10, 2021 Some related threads in case they help you or future readers: 2 Link to comment Share on other sites More sharing options...
tailbreezy Posted March 11, 2021 Share Posted March 11, 2021 You can also check this similar concept. https://www.sarasoueidan.com/tools/circulus/ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now