| start | 始点 | 
| end | 終点 | 
| layerMask | レイヤーマスク はレイキャストするときに選択的に衝突を無視するために使用します。 | 
| queryTriggerInteraction | トリガーに設定されているものも検索対象にするか | 
始点と終点を設定してそこに線を張り、コライダーがヒットした場合 true を返します
using UnityEngine; using System.Collections;
public class ExampleClass : MonoBehaviour { public Transform target; void Update() { if (Physics.Linecast(transform.position, target.position)) { Debug.Log("blocked"); } } }
| start | 始点 | 
| end | 終点 | 
| layerMask | レイヤーマスク はレイキャストするときに選択的に衝突を無視するために使用します。 | 
| queryTriggerInteraction | トリガーに設定されているものも検索対象にするか | 
| hitInfo | If true is returned, hitInfowill contain more information about where the collider was hit. (See Also: RaycastHit). | 
始点と終点を設定してそこに線を張り、コライダーがヒットした場合 true を返します
If true is returned, hitInfo will contain more information about where the collider was hit. (See Also: RaycastHit).
Layer mask is used to selectively ignore colliders when casting a ray.