How to address a 2D animation flaw during a ledge climb?
Thanks for anyone looking to help.
|
I'm working on a 2d game in unity and decided it needed a good ledge climb mechanic to make platforming easier.
|
I used a 2D skeleton rig using the Puppet2D add-on to do the actual climbing animation for the character. (Not really relevant, but figured I'd mention it.)
|
The way I decided to do it was by having the character always hang when colliding with a certain child of climbable ground in the game, and then be able to climb up onto the ledge by pressing up.
|
For the purposes of the game, your collider is turned off briefly as the actual sprite moves its position upwards from the rigid body parent in order to simulate the 'climbing.' Once the sprite reaches the top of the ledge and stands, the collider re-positions quickly to this point.
|
This idea works on paper, but because of how animation works in the unity time line, this causes a brief second where the sprite seems to teleport into the air then float down quickly to the collider position and quickly transition to the next animation. This is because I used an animation event during the climb animation to handle the re-positioning.
|
To compensate for this, I make the character's sprite invisible for the brief frame where she repositions to the collider during the animation.. I figured the animation would play so fast that it would not be noticeable
|
But sure enough, during the very end of her climb animation before she is able to begin a new animation there is a brief flash where she is not visible due to the above fix I attempted.
|
SO now I am stumped. Does anyone have any PRACTICAL knowledge of how to address something like this.
|
(as in, please don't refer me to the documentation tutorials, they are fairly awful for specific problems like this.)
|
Thank you so much for any help or suggestions that come to mind!
Your answer
Follow this Question
Related Questions
Should i use rigidbody for platformer movement? 1 Answer
Rigidbody2D.velocity Interupts Rigidbody2D.AddForce in 2D Platformer 0 Answers
changing to animation idle when i change too fast the moving directions? 1 Answer
How to add lighting to specific parts of sprite? 0 Answers
3rd person controller- anim parameters are not changing when i press stuff 0 Answers