Перейти к содержимому

Hand Tracking Triggers in Unity VR — Code vs. Visual Scripting

Jacques' 3D Real-Time Explorations

0:00 / 0:00

Hand Tracking Triggers in Unity VR — Code vs. Visual Scripting

116 просмотров · 3 мес. назад
Jacques' 3D Real-Time Explorations
119 подписчиков
116 просмотров · 3 мес. назад
Learn how to trigger events (like showing a menu) when a player's hand or controller touches or approaches an object in VR Built using 2 technics: Classic C# script Visual Scripting. Great for those without experience in coding. The script used in the video: // ---------------------------------------------------------------------------------------- using UnityEngine; public class ProximityMenuTrigger : MonoBehaviour { public GameObject targetToShow; void OnTriggerEnter(Collider other) { if (other.CompareTag("Hand")) targetToShow.SetActive(true); } void OnTriggerExit(Collider other) { if (other.CompareTag("Hand")) targetToShow.SetActive(false); } } // ---------------------------------------------------------------------------------------- Created by Jacques Fréty (NYP/SDM Singapore) - July 2026