Share Posted April 8, 2016 So, I have a small problem. I want to be able to customize things in the throwprops plugin, like friction and bounciness. But it doesn't let you do anything like that, so I wondered, is it possible to combine the functionality of the two plugins? Link to comment Share on other sites More sharing options...
Share Posted April 8, 2016 Hey hellol11 and welcome, You can use custom easing functions to build in the friction and bounciness. It'll just require some playing around to get the feel you're desiring. 2 Link to comment Share on other sites More sharing options...
Share Posted April 9, 2016 So how is edgeResistance different from friction? Link to comment Share on other sites More sharing options...
Share Posted April 9, 2016 jimeast, edgeResistance applies to when you are dragging something with Draggable. Friction is applied to physics-based tweens. hellol11, ThrowPropsPlugin has velocity tracking capabilities http://greensock.com/docs/#/HTML5/GSAP/Plugins/ThrowPropsPlugin/getVelocity/ so technically it is possible to get the velocity of something and apply that value to a Physics2D or PhysicsProps tween. However ThrowProps already does pretty much the same thing with the added benefit of allowing min and max values, overshoot tolerance and resistance (friction). Have you read up on the ThrowPropsPlugin.to() method? http://greensock.com/docs/#/HTML5/GSAP/Plugins/ThrowPropsPlugin/to/ Note, none of the physics tools have any built-in collision detection, nor do they naturally handle bounciness (outside of Bounce ease as Zach mentioned). 1 Link to comment Share on other sites More sharing options...
Share Posted April 9, 2016 Also note in the docs that you can define a "throwResistance" on your Draggable (basically like friction during the throw). It's 1000 by default. http://greensock.com/docs/#/HTML5/GSAP/Utils/Draggable/ 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