I need a character controller to not collide with certain objects that I specify. For instance, my player shoots a bullet that is instantiated at the player’s transform.position, but I don’t want there to be any physics between the player and the bullet.
My guess was to put them on different layers, but that didn’t work. Would I have to use some kind of Layer Mask, and if so, how would that be implemented?
Thanks ![]()
Thanks so much! It worked. Sorry, can't upvote your answer, not enough rep, but thanks anyways for the fast response.
– yoshimoto555Is there a way to get a prefab of a bullet not to collide with all other bullets. Would I really have to find all bullet game objects in the seen and set them to ignore collisions? Seems inefficient.
– yoshimoto555Physics.IgnoreLayerCollision(layer1, layer2);
– yogeeYou're awesome! Thanks
– yoshimoto555Upvoted - exactly the answer I needed
– Whippets