why can’t I see my NavMesh Changes change like that video…?
and for god knows what reason, my enemy cannot walk anymore. Here’s the changes I did so far:
- Unbaked the old NavMeshAgent
- Installed the package, and then went to GameObject → AI → NavMesh Modifier Volume
- On one of my floor tiles (I might delete the rest and make one large tile instead, that sounds like a better idea), I added the “NavMeshSurface”, and then baked that…
- Created a new “Character” Layer, and assigned it to my test enemy (I temporarily eliminated my old enemies so we can focus on getting just the first one to work, for now…), and then went to the NavMeshSurface on my floor, changed “Include Layers” to “mixed” (i.e: I eliminated the “Character” layers)
But he still refuses to walk… Did I miss something? I tried following the instructions but I think I may have missed something
I also have to mention that the targeting state had a bug when I placed the enemy on another spot for testing purposes (and when it worked, it focused on an entirely different area that had nothing to do with the enemy itself… it took a couple of tries before we got it working again. Check the first image under the NRE, the red area is my point of focus, and the blue one is where I expected the player to focus).
It gave me this NRE (it’s hard to get that one again, but somehow… it’s blaming @bixarrio 's crafting system for its lack of focus… now I’m genuinely confused), everytime the enemy hits me (and when I die, it no longer resets…):
NullReferenceException: Object reference not set to an instance of an object
RPG.Crafting.CraftingSystem.CloseCrafting () (at Assets/Asset Packs/bixarrio/RPG Crafting System/Scripts/CraftingSystem.cs:169)
UnityEngine.Events.InvokableCall.Invoke () (at <ba783288ca164d3099898a8819fcec1c>:0)
UnityEngine.Events.UnityEvent.Invoke () (at <ba783288ca164d3099898a8819fcec1c>:0)
RPG.Crafting.ShowHideCraftingUI.OnModalActive () (at Assets/GameDev.tv Assets/Scripts/UI/ShowHideCraftingUI.cs:28)
UnityEngine.Events.InvokableCall.Invoke () (at <ba783288ca164d3099898a8819fcec1c>:0)
UnityEngine.Events.UnityEvent`1[T0].Invoke (T0 arg0) (at <ba783288ca164d3099898a8819fcec1c>:0)
RPG.Attributes.Health.TakeDamage (UnityEngine.GameObject instigator, System.Single damage, RPG.Skills.Skill skill) (at Assets/Project Backup/Scripts/Attributes/Health.cs:177)
RPG.Combat.Fighter.TryHit (System.Int32 slot) (at Assets/Project Backup/Scripts/Combat/Fighter.cs:543)
and when I punch, it teleports the player, as shown below (the next image is a few blocks on the z-axis behind where he was right before punching…):
Are you sure this is a good idea…? (I’m no expert with NavMesh agents, but boy did this put my project in a terrible state… )
and finally, here’s the NRE that comes from the failed targeting state:
NullReferenceException: Object reference not set to an instance of an object
RPG.States.Player.PlayerTargetingState.Tick (System.Single deltaTime) (at Assets/Project Backup/Scripts/State Machines/Player/PlayerTargetingState.cs:33)
RPG.States.StateMachine.Update () (at Assets/Project Backup/Scripts/State Machines/StateMachine.cs:18)
which is basically leading to this line in ‘PlayerTargetingState.cs’:
FaceTarget(stateMachine.Targeter.CurrentTarget.transform.position, deltaTime);
I reversed the project… I think we need to address a lot of issues before I try changing the NavMeshAgent