Answers for "unity how to make two objects not collide"

5

unity how to make two objects not collide

void OnCollisionEnter(Collision collision)
  {
      if (collision.gameObject.tag == "theobjectToIgnore")
      {
          Physics.IgnoreCollision(theobjectToIgnore.collider, collider);
      }
Posted by: Guest on May-05-2020
0

how to make sertain objects not collide with each other unity

Create a new layer called "Enemies" and have it
be the layer of all your enemy gameobjects. Then
take a look at the Physics Layers settings under
Edit/Project Settings/Physics, 
and disable collisions for objects 
in the Enemies layer with other 
objects in that same layer.
Posted by: Guest on January-09-2021

Code answers related to "unity how to make two objects not collide"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language