How to specifically arrange only 'Mesh Collider' to be hit by Raycast?
I have a script that opens/closes doors when pressed button within collider range which works fine. Except the UI text (prints 'E' on screen when looked at door) detects Box Collider (Is Trigger for range) as well. This causes text to appear surroundings of the door. How can i specifically arrange only 'Mesh Collider' (door itself) to be hit by Raycast?
if (Physics.Raycast(ray, out hit, Reach))
{
if (hit.collider.tag == "Door")
I'm new to scripts world, so please explain it like i'm retarded. (: Also if there is a better approach to this, i would like to hear.
door-collider.jpg
(77.6 kB)
Comment
Your answer
Follow this Question
Related Questions
Find what size sphere collider can fit in a point 1 Answer
Configerable joint problem !! 0 Answers
How to do a Placement object properly? 0 Answers
How do I keep rigidbodies from pushing each other? 2 Answers