Jumping system for 3D platformer

Hi, I’m Daley and I am very new to the world of game dev! I have a character controller ready (just the standard 3rd person controller from unity)

I am working on a 3D side scroller( like little nightmares)

Has Anyone experience with a platform movement system with targeted jumping?

Like a UI pop-up that says like “press space to jump here”. Like in the game stray?

No jumping allowed unless a jumpable layer is near on a layermask.
I am trying to figure this out but I cannot find out how to do this…

I have tried box cast, sphere cast and ray casts but I could not get it to work. Had a basic system ready from a tutorial of how to vault but then you needed to press the space bar two times so that’s not great…

Here a picture of how it could look:

If anyone can help me with this that would be great!

A simple way would be to have a script with a trigger at the position you want to jump from. Assign a jump target transform to this script.

When the player enters the trigger, the script tells the player what the jump target position is, when the player leaves the trigger it clears the player jump target. Then you can just handle the jump execution in your player using the jump target, and default to jumping normally when there is no jump target.

1 Like

Thank you for this tip. I indeed knew about the trigger system but I don’t want to put triggers manually everywhere haha.

Stil working on the whole ray cast thing. I have a first version finally working with a ray cast for climbing up.
Now time to reverse engender it for jumping down!

I know what you mean, but sometimes those menial manual tasks result in a more stable and re-usable solution.

Consider your rework for jumping down, how many more very similar situations are you going to have to rework it for? Maybe you will want a jump sideways, or jump onto a ladder. The trigger solution can more easily be made in a way that would support all of them because it’s predictable and repeatable.