[FollowerEntity] Manual Player Jump Movment

Hi all,

I am wondering what is the recommend way to do a manual player jump movement using FollowerEntity? Becuase FollowEntity using recast graph and a jump break it out of the pathfinding.

If I use followerEntity.isStopped = true; It will try to repair the path to pull the character back to ground. If I use followerEntity.canMove = false; instead then it doesn’t uses physic and gravity.

I end up making it partial working by swapping it with using a ridgidbody during jump. While it’s partially working, don’t really like end up with 2 different physics and probably need to deal with character reached a non-pathing area on landing.

Just wondering if anyone have an alternative take on this or a way via using followerEntity. Not too experience with ESC at the moment but I suppose there should be a way via using ECS physics instead of swapping with rigidbody physic?

Thanks all.

I think the answer on this depends on why and when they’re jumping in your specific case. Can you give us some more information on when the player is jumping and how?

In general, I’d also check out the Manual Player Movement section of the Documentation- it doesn’t cover jumping but it does cover using Astar with manual movement.

Thanks for the reply!

Yeah I am using the Manual Player Movement from the documentation.

What I am implementing is a third person character jump (Press space to jump up and w for forward jump). I guess the use case would be for jumping over obstacles such as barriers/fences and thinking about doing stuff like air dash movement.

You made a very valid point thought. I am actually thinking the same thing recently on why. While it does give player more freedom of movement, I am not sure it justify the potient of more bugs occuring from reaching non-pathing area consider I am using FollowerEnitity navmesh for player movement.

I guess with jump, would be cool to implement something like if the player jump and a bolder come flying via a boss attack or catapult, it will knock the player flying.

No problem! Actually, follow-up question, is there a reason you’re using Astar for the player entirely? Do they ever need to do any pathfinding themselves, or is the player most always in control? If you just need the player to auto-walk somewhere on seldom occasion, I think I’d recommend building a standard character controller, then creating paths, and having the player move through that path. But if you don’t need any other AI-like features, I don’t know if the Manual Player Movement example would be particularly helpful. Let me know if you need any help getting a normal player controller to follow a path :+1:

Interesting thought.

I am actually conflicted on using FollowerEnity on the player or just a seperate player controller.

Currently player is most always in control. No need auto-walk.

The main reason I am using it at the moment is:
!. Easier to implement NPC to NPC reaction and NPC to player reaction since if both NPC and player uses same logic and same FollowerEntity. I don’t need to create a seperate logic for NPC to player reaction. (such as local avoidance)
2. Advantage of when moving into an obstacle such as running at a tree, the agent will automatically move around it.
3. Easier to quality control, anything player can not do due to pathing, NPC can not do either.

An interesting thought that bring up is that with AI on player character, I could actually do stuff like if player is idle for a while, ai will take over and move player to lets say a chair near by and sit down or lean on a nearby wall. :thinking: