point
The point of contact.
読み終わるまでの所要時間 1 分最終更新 1ヶ月前
Definition
- Type: Property
- Namespace: UnityEngine
- Assembly: UnityEngine.PhysicsModule
public Vector3 point { get; }
Remarks
The point of contact in world space where the collision contact occurred. This represents the point on the surface of the collider where the contact was detected. The value is expressed in world space, meaning it is relative to the global coordinate system of the scene, not the local space of either colliding object.
Examples
using UnityEngine;public class Example : MonoBehaviour{ // Print how many points are colliding this transform // And print the first point that is colliding. void OnCollisionEnter(Collision other) { print("Points colliding: " + other.contacts.Length); print("First point that collided: " + other.contacts[0].point); }}