Yaaaaar

Bezier ending point

Recommended Posts

Hello everyone! I had a question about ending point of bezier curve. If I'm using x and y properties in bezier function, my balls fly much further than the point(x:1073, y:0) I indicated with each execution of function. When I'm using left and top properties balls fly specifically to this point(left:1207, top: 100) constantly, but i can't use that, because i have a checkFirst fucntion, which is using left property to compare. I tried to use _gsTransform.x, but this is not a option, because for each element it's the same. Could you help me with that, please? Thanks!

Share this post


Link to post
Share on other sites

transform values like x and y are relative to the objects natural position.

 

If you have an item with left:100px and another with left:200px, their x value is 0. If you give them both an x of 100, they will move 100 pixels to the right of their current position landing at 200px and 300px respectively.

 

The solution for you is to give all your balls position:absolute. This will in effect put them all in the same place with x:0, y:0. You can then place them in a row  and space them however you like (I use a TweenLite.set()) and then if you tween them to the same x,y values they will end up in the same spot

 

  • Like 4
  • Thanks 1

Share this post


Link to post
Share on other sites

I was trying do that with absolute, but something gone wrong. But now it works, thanks for your help! Even tho my questions is kinda not about tweenmax, actually. Anyway, thank you!

  • Like 1

Share this post


Link to post
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.