Hi!

I'm playing with NPCs and I'm having an issue with the interaction machine: if the hero is close to the NPC and the player clicks anywhere on the map to move away, it'll instead activate the interaction machine of the NPC. So the hero is completely stuck to the NPC, effectively softlocking the player.

I'm using mouse controls with Nav Mesh Agents on my game objects, and the interaction machine seems to be working fine outside for this problem. I've played with several settings to try to prevent that, but the only way I've found is to increase by a significant margin the radius of the Nav Mesh Agents, preventing the character to get close to the NPC. However, the radius increase required makes the player stay visually too far away from NPCs, creating a huge invisible bubble around the NPC.

Is there a way to prevent that issue without creating those huge bubbles around NPCs?

Thanks :)
  • Sounds a bit like the NPC's collider fills up the whole screen in that case.
    Check it by showing gizmos in the game view and having the NPC selected.
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • No, the collider wasn't that big. But after reading your reply, I played with the radius settings of the NPC's collider, Nav Mesh Agent and Character Controller (now that I write this, I wonder if I don't have too much components on my NPC...) and I think they didn't have the same radius settings...

    Anyway, I put the same value for the three components and now I can't seem to recreate the issue... Now I'm certain I tried this yesterday, I played quite a bit on this issue... :s

    I apologize for taking your time on this matter, but thanks again!
  • Those components having a different radius shouldn't really be causing this - the only thing used for this is the collider (when interacting via click on the game object).
    Please consider rating/reviewing my products on the Asset Store (hopefully positively), as that helps tremendously with getting found.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Ok, thank you for the precision. I'll keep this in mind since I have the feeling I'll meet this issue again since I don't really know how I fixed it :s
Sign In or Register to comment.