Unity 6.3
0 онлайн 67 гостей 3 в системе
Вход

ControllerColliderHit.gameObject

Declaration

public GameObject gameObject;

Описание

GameObject, по которому ударил контроллер.

using UnityEngine;

public class Example : MonoBehaviour { void OnControllerColliderHit(ControllerColliderHit hit) { // Objects we touch, move them to position (0, 0, 0) hit.gameObject.transform.position = Vector3.zero; } }