unityおぼえがき2

■Physics.Raycast()で戻ってくる値

hit.point  座標
hit.normal  面の角度
hit.distance 距離
hit.collider コリジョン情報

var hit : RaycastHit;
Physics.Raycast(origin, direction, hit,distance,layerMask);
if (hit.collider.gameObject.tag=="Player") {}

layerMaskは32ビットのマスク。1<<9で9番のレイヤーを指定。~(1<<9)なら9番以外全部を指定。
複数指定したい場合は(1<<9)||(1<<10)のようにorで取る。