- Home /
Navmesh Jump Animation
Hi has anyone know anything about navmesh jump animations , I have set up my navmesh and have the jump point's working I just need help on how to get it to play different animations when it detects the jump point's.
I have used Mecanim for my animations and for now while I prototype have used unity's example bear from the nav mesh example.
However I have my own AI script, just using the example for the animations.
What I am having issues with is trying to play/blend a jump animation. Not sure what I should do, hope someone can help and im sure the community will learn from anything that anyone has to offer as I haven't been successful while researching this topic.
Thanks in advance
Answer by superme2012 · Jun 30, 2013 at 02:33 PM
I did this little quick script to detect when the NavMeshAgent is jumping, not sure if its of any use to you:
string linkType = GetComponent().currentOffMeshLinkData.linkType.ToString();
if(linkType == "LinkTypeJumpAcross"){ Debug.Log ("Yeah im in the jump)"); //Activate animation here }
The other way is to use
NavMeshAgent.isOnOffMeshLink (its a bool)
What would be needed is the calculation of the distance and the height, I guess you could use that data in a blend tree to get the desired result. I’m new to mecanim so not sure what is and is not possible yet.
I have a problem which is slightly different "supreme2012". I want my character to jump with force in both forward and upward direction. How can it be done provided I do not want to work with horizontal/vertical axes inputs. I have the animation of Jump with force in both upwarda and forward direction. Hoew do I solve it?
You may be able to use the Nav$$anonymous$$eshAgent as a proxy object and set the position of the character to match the position. That way the character can move interdependently without worry about moving the Nav$$anonymous$$eshAgent up or down. Its how I would do it.
Your answer
Follow this Question
Related Questions
how to set mecanim parameters for an ai? 0 Answers
C# Help with setting up jump animation 0 Answers
Teddy Bear Mecanim NavMesh (my animations don't work) 0 Answers
Mecanim jump animation 0 Answers
Rotate Mecanim animation during Navmesh path finding. 0 Answers