Let there be movement, and movement there is


Hello there!

During today's gamedev stream I was able to implement wall jump and wall slide! This leaves only the climb mechanic to completely implement a Megaman X like movement.

Finite State Machine

The FSM, Finite State Machine implementation I did made everything easy, with just a condition on which states should transition to the WALL state, and then creating the behavior inside the wall.gd, everything was good to go in about 2h. But I ran into problems trying to implement the climb mechanic

Reference


As you can see, whenever we press the jump action while sliding on a wall in Megaman X, the character performs a characteristic climbing making a semi-circular movement in the Y Axis.

The way I tried to implement this is by modifying the character velocity in the horizontal (X) axis at the same time as I modify the vertical (y) velocity. This is what I thought would work to create this semi-circle, but I ran into problems doing so. In middle of the jump the character then has its horizontal velocity turned back to the opposite of the force I applied to do the climb movement, nullifying the the force applied before the jump.

This makes the character do an almost 0 length movement, because the horizontal axis is way smaller than the vertical one, I even tried to hardcode some implementations to force them to be equal, but no success until now.

So...I'm kinda desperate for a solution for that, do you guys have any approach to this solving this problem? Doubts, suggestions, other references? I need everything I can get. But...that's all for now!

Keep developing and until the next time!

Get Pigdev's Platform Template

Pre-order Now$15.00 USD or more

Comments

Log in with itch.io to leave a comment.

(+1)

Looking awesome!

(+1)

Isn't? I'm looking forward to start doing other character's animation to see if they'll look this cool! xD