kestal
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by kestal
-
-
Hi,
For the purpose of distilling this problem to its principal components, let's say I have 2 object that are side by side, say at y=100 pixels. I want both of those to fall down the screen, but to different destination y locations. I want them both to accelerate (easeIn), at the same speed, even though their distance to tween is different. Also I want to cap their final velocity, so they never fall faster than pixels/sec.
Here is an illustration:
(initial position)
Sprite1 Sprite2
(fromX = 0, fromY = 0) (fromX = 100, fromY = 0)
(toX = 0, toY = 200) (toX = 100, toY = 400)
(falling --> Sprite 1 and Sprite 2 have the EXACT same Y location as falling, since they are using the same custom easing IN function to control their acceleration and final velocity)
(falling)
..
..
..
Sprite1 has stopped here)
Sprite1 (x=0, y=200) Sprite2 (is at the exact same Y locations because they are following the
same easing IN function, regardless of total distance to travel
(Sprite2 continues to fall until it reaches it target location of y=400)
Sprite2 (x = 100, y = 400)
Thanks,
--Kestal
Easing with constant acceleration and upper bound on velocity (custom easing?)
in GSAP (Flash)
Posted
Thanks Carl!
I have been reading these posts for some time, and as always, you are a wealth of info.
Thanks for the tip about checking the velocity. I am already using the Seek() method several places to dissect that a tween is doing, for subsequent tweens and processing. I had not thought about using it here, to determine when to break a tween into two pieces (acceleration, then linear). This may work, and is a great idea!
Also, I ran into the same thing with the Physics plugin, the terminal velocity. Would it be easy to just hack up the physics plugin to rate limit it?
Thanks again!
--Kestal