- Home /
Problem with NavMesh link and animations
Guys, I’m having problems connecting the jump animation and the NavMesh link transition. The problem is that not every jump is the same high and so I can’t just play the same jump animation for every jump, instead I was thinking about splitting the jump in 3 parts, the jump, a flying idle (with loop on to fill the gap between the jump and the landing) and then the landing animation. The problem is that I don’t know how to do this on the NavMesh link, is there a function, like the trigger one, like onNavMeshEnter or something like that?
Answer by nickk2002 · Apr 20, 2020 at 12:14 PM
No there is no function but I managed to do something similar (elavator) . You could create a bool isOnLink
, initially set to false. Then you could just check agent is NavmeshAgent isOnLink (simple bool)
void Update(){
if(agent.isOnOffMeshLink == true && isOnLink == false){
// trigger animator
}
isOnLink = agent.isOnOffMeshLink;
}