Hello,
It's been a while!
I'm wondering how can I make the character Jump while its running or walking. The effect I'm trying to achieve is simple, he has for example another 10 feet to walk/run towards (point and click), and I want to jump Mid way thrusting the char forward and upward at the same time, and when it lands to continue walking/running to the destination.
Hope there's an easy way to this,
Thanks,
Note: Basically same thing as direct input, you can jump while running etc. I am utilizing this:
http://adventure-creator.wikia.com/wiki/Combining_PointAndClick_with_Direct_Movement_Methods In order to have both at the same time.
Comments
Your example case suggests that this would be a pre-planned event, i.e. a specific case. Is that the situation, or are you looking for something more general?
If you can explain your exact intentions in the form of screenshots and clearer detail, I can think more about how you might go about it.
The whole game makes a lot more sense to be played with mouse point and click, however the jump is imperative.
The direct movement method is only in there in case someone wanted to play with a controller.
I am extremely hopeful that this can be done, otherwise I've no idea how to continue with AC.
Please shine some bright light
Thank you for your long continued support
https://docs.unity3d.com/Manual/class-OffMeshLink.html
https://docs.unity3d.com/Manual/nav-CreateOffMeshLink.html
https://forum.unity.com/threads/how-to-trigger-a-jump-on-an-offmesh-link.313628/
AC characters rely on an internal waypoint algorithm by default, but you can have them instead rely on NavMeshAgents by attaching the "NavMeshAgent Integration" component. It may be that some minor tweaking is necessary, but I'd say Off-Mesh Links are probably your best bet.
As they're also a Unity feature, it may be best to test with them alone without AC first, and then only look to merge them with AC once they're up and running (and jumping) OK.
Anyway, I believe just the ActionList system in AC makes the whole package hugely valuable. Dropping the entire asset just because of the character controller doesn't make much sense to me... Plus, point and click jump isn't a very common feature, "platforming" is almost always done entirely through direct input...
@ChrisIceBox I also wanted to allow the player to have more control of when they jump in game, it could be random anywhere. Unity's NavMesh seems like you will not have full control of when the Player can jump.
@Alverik, you are right AC is definitely too great an asset to drop. It is robut and it seems to support any integration one might want to do with some coding knowledge.
I will take a look at what other character controller assets I have and see what I can do from there on,
If you have any 3rd party asset recommendations please let me know,
Thank you.
That is no problem, I also have it mapped to the Space button for Jump.
What I am getting from this now is, I force the character to jump by transform force or physics in the Y direction if player not moving, and Y&Z if moving?
Also play the Jump animation, and the path-finding will not have any issues?
I want the player to be able to fall down if they do not jump, and if they do jump to continue if landed properly. Also to be able to jump anytime,
I will watch all the unity tutorials on their NavMesh and see what I am missing, if you have any more pointers, insights etc I should know much appreciated.
Thank you for all your help
The current X/Z velocity of the character can be accounted for when calculating a jump force to apply to them.
As AC's NavMeshAgentIntegration component is isolated from the rest of AC, you can replace it with a duplicate that you can then tweak as necessary.