hey, i'm very new at this so any help is highly appreciated! can't figure out how to rotate my sprite when jumping/landing and return it to normal when grounded... thx in advance
Answer by letitslide
Feb 23 at 12:39 AM
You'd have to lerp it, really. If the flipping has to be accurate to where the flip ends when the character is about to land, you will have to lerp your transform.rotate method to include distance from the ground.
The distance from the ground will accelerate or slow down the spinning motion of the transform to best suite visually a landing.
awesome, will look into it. Thx!
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a site navigation guide.
If you are a new user to Unity Answers, check out our FAQ for more information.
Make sure to check out our Knowledge Base for commonly asked Unity questions.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
Answers and Comments
159 People are following this question.
Sprites only rotate by 90 degrees
Sprite gets rotated when Joystick Y at 1 or -1?
Parenting an object causes it to change rotation
2D rotation problem
How to enable vertical movement in certain areas only 2d