Example #1
0
 static void CreateVRVisualisationPrefab()
 {
     GameObject obj = new GameObject("[IATK] New VR Visualisation");
     VRVisualisation vrVisComponent = obj.AddComponent<VRVisualisation>();
     Selection.activeGameObject = obj;
     MakeInteractable(vrVisComponent);
 }
Example #2
0
        private static void MakeInteractable(VRVisualisation vrVisComponent)
        {
            GameObject linearJointDrivePrefab = GetPrefab(prefabInteractionsLinearJointDrive);
            vrVisComponent.linearJointDrivePrefab = linearJointDrivePrefab;

            GameObject interactablePrefab = GetPrefab(prefabInteractable);
            GameObject newInteractable = vrVisComponent.WrapIn(Instantiate(interactablePrefab), interactableSuffix);

            ConfigInteractableRigidbody(newInteractable);
            ConfigInteractableGrabAction(newInteractable);
        }