- Home /
This question was
closed Dec 06, 2016 at 03:07 AM by
getyour411 for the following reason:
http://answers.unity3d.com/questions/1280417/run-code-when-the-player-looks-at-an-object.html
Question by
Golden_Obsidian · Dec 06, 2016 at 03:06 AM ·
c#3dcolliderstriggers
Can I make a collider ignore only one other collider?
(3d project, unity c#) Lets say I have 2 types of objects, ghosts and nonghosts. I want the ghosts to be able to interact with triggers, but not things in the world. I want the nonghosts to interact with everything except for the ghosts. I have a box collider on the ghosts so that they still activate the triggers, but this means that they can interact with objects in the world. Is there an option I can change to make the ghosts ignore objects that aren't triggers?
Comment
You can ingore it by searching objects by tags, when obj.tag == "ghost" just return, it won't trigger the function. I hope I helped.