Making character go from flying to walking after hitting ground

Hello everyone!

I am trying out a small prototype where I have character which can run around and jump. When the character then stays in the air for x seconds he starts flying, this all works well the problem I have is when he is supposed to land again. The character won’t recognize that he is on the ground and just keeps being in fly-mode.

I have thought of a solution where I could cause a hit event when the character hits the ground which would force him into walk-mode but I was wondering if there were any other, potentially better, way of doing this.

Cheers!

I’m experimenting with this at the moment, I’m thinking I’ll do a line trace below the character and if there is ground about 100 units from their feet, then I will use a set movement mode node to make them in the jumping/falling movement mode. This way they will still have the ground-landing animation as they would when they jump.

A line trace isn’t necessary.

This should answer it for you. :slight_smile:

Call this event and set the details of the function to do what you need them to. Good luck!

I’ve been looking at ways to do this… unfortunately the On Landed event will only fire when the character is in Falling mode (not when in Flying mode).

I know there are a few different ways to implement this… like with line traces and collisions… but is there a more elegant, native way using the Character Movement Component in BP or C++?