Make Objects Intangible with Rigidbody and NavMesh

Hey, I’m working on an MMORPG called Virtual Monsters RPG. Right now, I am working on my NPC’s and I was wondering, is there a way to make NPC’s able to walk through each other like ghosts? I want them to be intangible, or not solid, so that they won’t pose as an obstacle for players. Since it’s going to be an MMO, I need this but, there’s a chance that I will be able to manage without it.

Currently, I’m using NavMesh’s pathfinding system to make NPC’s walk over the map. And if you don’t know, Unity’s NavMesh need’s a Rigidbody in-order to work properly. I like the Rigidbody and I like NavMesh, as a lot of my code is based around this however, I still want players the ability to walk through some NPC’s, especially those that are just meant to give players information about the game and the world around them. I plan on building cities with some complex traffic systems so, I would like it if I can make objects intangible, even when using Rigidbody.

I’ve tried many things, including altering the Physics Layer Collision Matrix, which doesn’t solve anything. I really like NavMesh but, I would hate to start my game all over again because of something so small.

I noticed that the Rigidbody2D has something for it but, not Rigidbody for 3D objects.

Okay, so I found the solution to my problem here: Disabling collisions between Nav Mesh Agents? - Questions & Answers - Unity Discussions

The problem wasn’t Rigidbody, or Triggers, or Colliders or even Collisions for that matter. It was the NavMeshAgent that kept colliding with other NavMeshAgents. It was kind of annoying. Got rid of it by decreasing the radius to 0.1. In case anyone else ever ends up having this same problem.

1 Like