0
Explorer
,
/t5/animate-discussions/single-vector-deceleration/td-p/116050
Dec 02, 2008
Dec 02, 2008
Copy link to clipboard
Copied
Hello,
I think this is one of those dead simple problems, yet I can’t seem to figure out what is going on...
I’m trying to get an object/ball to start at some speed, smoothly decelerate, and stop exactly as some specified distance.
The formula I’m using is from 1d kinematics:
V(f)^2 = V(i)^2 + 2ad
V(f) is 0, since I want it to stop moving, acceleration I have set to -1, and distance I have set to 100.
V(i) = squareRoot(-2 * a * d);
Yet when I run it, my object starts at 0px, and stops at 92.95px and I can't figure out why it never reaches whatever my distance is set as.
I think this is one of those dead simple problems, yet I can’t seem to figure out what is going on...
I’m trying to get an object/ball to start at some speed, smoothly decelerate, and stop exactly as some specified distance.
The formula I’m using is from 1d kinematics:
V(f)^2 = V(i)^2 + 2ad
V(f) is 0, since I want it to stop moving, acceleration I have set to -1, and distance I have set to 100.
V(i) = squareRoot(-2 * a * d);
Yet when I run it, my object starts at 0px, and stops at 92.95px and I can't figure out why it never reaches whatever my distance is set as.
TOPICS
ActionScript
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
1 Correct answer
Guru
,
Dec 02, 2008
Dec 02, 2008
although i would run a decel formula a bit differently, I'm
just wondering why you may not be able to use a tween with easing
here? as in:
import mx.transitions.Tween;
import mx.transitions.easing.*;
new Tween(ballClip, '_x', Strong.easeOut, 0, 100, 1, true); //one second
import mx.transitions.Tween;
import mx.transitions.easing.*;
new Tween(ballClip, '_x', Strong.easeOut, 0, 100, 1, true); //one second
Guru
,
/t5/animate-discussions/single-vector-deceleration/m-p/116051#M243247
Dec 02, 2008
Dec 02, 2008
Copy link to clipboard
Copied
although i would run a decel formula a bit differently, I'm
just wondering why you may not be able to use a tween with easing
here? as in:
import mx.transitions.Tween;
import mx.transitions.easing.*;
new Tween(ballClip, '_x', Strong.easeOut, 0, 100, 1, true); //one second
import mx.transitions.Tween;
import mx.transitions.easing.*;
new Tween(ballClip, '_x', Strong.easeOut, 0, 100, 1, true); //one second
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Some1Won
AUTHOR
Explorer
,
/t5/animate-discussions/single-vector-deceleration/m-p/116052#M243249
Dec 02, 2008
Dec 02, 2008
Copy link to clipboard
Copied
Hm, I never thought of that and it does work for a single
‘push’ motion. I want to keep being able to
‘push’ this object along, every time another 100 (or
some determined amount) pixels more. How would you do this with the
tween class? Create a new tween every time?
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/animate-discussions/single-vector-deceleration/m-p/116053#M243250
Dec 02, 2008
Dec 02, 2008
Copy link to clipboard
Copied
>>How would you do this with the tween class? Create a
new tween every time?
Yup... but I'd suggest ditching the crappy built-in Tween class and using
Tweener, or any other of the much better 3rd party classes.
--
Dave -
www.offroadfire.com
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/
Yup... but I'd suggest ditching the crappy built-in Tween class and using
Tweener, or any other of the much better 3rd party classes.
--
Dave -
www.offroadfire.com
Head Developer
http://www.blurredistinction.com
Adobe Community Expert
http://www.adobe.com/communities/experts/
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Some1Won
AUTHOR
Explorer
,
LATEST
/t5/animate-discussions/single-vector-deceleration/m-p/116054#M243251
Dec 02, 2008
Dec 02, 2008
Copy link to clipboard
Copied
Hm, okay. It looks like it would work fine then. Thank you
both for your fast responses.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

