Need help with understanding how to make a fall and jetpack system!!!

Hey guys, i am really struggling with understanding how to make a player fall when the player walks off the edge and how to make a jetpack system where it uses fuel. I have done a cooldown system before for a gun which i believe is something i could use for the jetpack fuel but would i need to use constant force or is there something more to it?

I haven’t written the code yet as i believe it’s better to think it through than go straight into programming it with all the player controller lines of code that has been done so far XD.

My first question would be: What happens now if your player falls off an edge/isn’t grounded? :slight_smile:

I can see how a cooldown system and a fuel system can be similar.

now atm, there is a jump system where the player goes from jumping and if grounded then it plays the idle state.

Right, well say you move, you’re not jumping and also not grounded that would mean you’re falling, ya? (not including the jetpack*).

yeah, so as soon as player moves off the ledge he won’t be grounded as he fell off the platform

That’s what I’m saying. Doesn’t the player just fall now or does it just hang in the air?

atm i have the animation for the player but not sure how to play it if the player isn’t grounded. but yes it does fall but doesn’t play the animation XD

Ah okay, so when you detect that you’re not grounded (and not jumping), just play the animation? :slight_smile:

Ah, for some reason it detects not grounded but it’s only when i press the jump button :confused: XD how do i set it without pushing a button or causing the player to jump?

In my character controller, I check for grounded every frame with a short raycast (pretty much the same as the standard assets 3rd person).