Jump to content
GreenSock

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

Objects should end up falling off a conveyor belt with different resolutions

Recommended Posts

Hello community,
I have a treadmill (conveyor belt) in SVG. Elements should roll off the conveyor to this end and then fall off. I have already mastered this animation with fixed values. My problem is that it also has to work with different resolutions. Otherwise the objects float in the air and fall. Now I tried to recognize the width of the treadmill (offsetWidth) and to make the animation of this length. But the treadmill (SVG) is wider than the visible area.

 

Here are some pictures:

 

image.png.54fdbee30e86f1bb77e5fe5d2b3c5781.png

 

image.png.8baa6e675fe61ff01635cc604ba29087.png

 

I would be very grateful for your help!
 

P.S. If someone had an additional tip for falling physics with greensock, I would be grateful for it :) So far, they only fall straight down ..


 

Share this post


Link to post
Share on other sites

Hey BFreakout and welcome! 

 

There are several methods that you can use to do this. The first that came to my mind is to use MotionPathPlugin, especially if your conveyor belt and items are all SVG (but they don't have to be - it just makes resizing easier). Motion paths made with it aren't responsive by default, but you can kill and old instance and re-create it when you need to. 

 

17 minutes ago, BFreakout said:

If someone had an additional tip for falling physics with greensock, I would be grateful for it :) So far, they only fall straight down ..

I recommend fake physics rather than trying to use real physics. By that I mean use a motion path that doesn't go straight down and you could use a separate tween (applied to a container <g> most likely) that adds some rotation if you want to as well.

 

If you really and to do something with physics, you could look into this library: https://github.com/subprotocol/verlet-js

  • Like 2

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×