How can I make the animation match the speed of acceleration?
so basically what i'm asking for is when the speed of movement to a direction is slow, i would like the animation to match at slow speed, when the movement accelerates, the animation speed up as well
Best Answer
-
Socks London, UK.Posts: 12,822
@tatiang said:
You can check the speed of an actor through it's X and Y linear velocity attributes.Yep, you can find an actor's velocity with . . . the square root of the square of X linear velocity + the square of Y linear velocity . . . which should look something like this:
sqrt(pow(self Linear Velocity X, 2)+pow( self Linear Velocity Y ,2))
This will give you the actual velocity of an actor regardless of what direction it is moving in.
Example - an actor moving right at 100pps (linear velocity X 100) and up at 100pps (linear velocity Y 100) is moving at a velocity of 141.42pps at 45°.
EDIT, whoops, this should really be aimed @dellagarpo
Answers
You can check the speed of an actor through it's X and Y linear velocity attributes. As you can see from the Animate behavior, there is not built-in way to use an expression. So you'll need to use a custom animation. Google custom animation speed gamesalad
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
Hahahaha
?
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User
just laughing at Socks mistake lol
Oh
New to GameSalad? (FAQs) | Tutorials | Templates | Greenleaf Games | Educator & Certified GameSalad User