![]() was all excited for the basics, then realized that any player could just push someone around the scene. I originally thought of this when I had a small multiplayer scene. Wasn't able to do so - admit my testing is a bit limited, but maybe this will help you. So, I ran a quick test where I asked one character to walk to a spot and I tried to ram into it or even stop it. Only the main char object was on the ignore layer (not its children, naturally - plus, for me it was the only one besides the new one that had a collider). Then, in awake I used the Physics.IgnoreCollision(Collider obj1, Collider obj2) On the empty, I added a kinematic rigidbody, and a sphere collider (made the sphere pretty small and chest height, for the sake of saying so - thinking out loud, I guess you'd expand this if some chars could be really tall/short. I added an empty game object as a child to each. What I did was : make collision between players (and NPCs) non-existent (their layer). ![]() I did not test with the player having a navmeshAgent nor a NM obstacle*.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |