Jump to content

Search In
  • More options...
Find results that contain...
Find results in...

Change the friction of a draggable wheel

Recommended Posts

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

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.



  • Like 2
Link to comment
Share on other sites

Some related threads in case they help you or future readers:


  • Like 2
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.