system
1
hi, i’m working on side-scroll game and i made a plane, and i made a ray going from the cursor so the Character will look at that hit point, but i don’t want the ray to collid with anyOther game object, i want it to collid with the plane collider only, thnx.
Kourosh
2
Use layermask to ignore unwanted colliders. Simply define a Layermask variable and pass it to the Raycast function. Then only you will have control over your raycast.
http://unity3d.com/support/documentation/ScriptReference/Physics.Raycast.html