Jump to content
Search Community

Stopping a throw animation

d11202 test
Moderator Tag

Go to solution Solved by Diaco,

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hi

 

Can anyone tell me if there's a 'best practices' way of stopping a throw animation.

 

Basically I want an element to be able to catch something that a player has thrown using the Draggable / ThrowPropsPlugIn. If the element catches the thrown object, the thrown object would stop short of the distance it would have glided (been thrown).

 

Many thanks in advance

 

Link to comment
Share on other sites

HI d11202 :),

 

I think the best practice would depend on what you're hoping to accomplish. 

 

If I'm understanding your question, I'd guess you'll want to set up some bounds for the draggable along with a snap array and maybe a hit test? 

 

Do you happen to have a CodePen available with your basic layout? That would definitely help everyone as they attempt to answer your questions. 

http://greensock.com/forums/topic/9002-read-this-first-how-to-create-a-codepen-demo/

 

You've probably seen the draggable docs page, but just in case - lots of good reading here:

http://greensock.com/docs/#/HTML5/Drag/Draggable/

 

Happy tweening. :)

  • Like 1
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.
×
×
  • Create New...