Download

How to have jumpers and non-jumpers NPC without stuck the non-jumpers? NavModifier?..Filters? Other?

Hello !

So… I “simply” would that some of my NPCs can follow my main character and avoid obstacles by jumping on it and some others by getting around it. I’ve already the following function. NPCs can follow my main character. I have in the RecastNavMesh settings a parameter named “Max Step Height” managing the max height to which the NPC can jump. I raised this parameter. So the “jumper” NPCs can jump over small obstacles. The “non-jumper” NPCs can’t and must not. Problem is that jumper and non-jumper NPCs share the same NavMesh… And so the same “Max Step Height” value. And then, non-jumpers “believe” that they can jump but as they don’t, they just get stuck behind obstacles… I tested with a jumper NPC : When I desactivate his jump function, he is stuck at the least barrier…

So I think it needs a way to change this “Max Step Height” setting according to the type of NPC (jumper or non-jumper). I found around NavModifierVolumes, NavAreaClasses and NavFilters but I don’t understand at all…

And, finally, I’m not even sure it’s the good approach. Maybe I’ve been going about this all the wrong way…

PS : English is not my native language so sorry for the likely mistakes…