1 using System.Collections;
2 using System.Collections.Generic;
14 public Animator animator;
16 public Transform grab_point;
21 if(Application.isPlaying) {
22 GameObject.DestroyImmediate(gameObject);
26 grab_point = AVR.Core.Utils.Misc.CreateEmptyGameObject(
"GrabPoint", transform);
32 grab_point.localPosition = gp.transform.InverseTransformPoint(gp.grabPoint.position);
33 }
catch(System.Exception) { }
35 node = GetComponentInParent<AVR_GrabNode>();
37 transform.position = transform.parent.position - (grab_point.position - transform.position);
42 node = GetComponentInParent<AVR_GrabNode>();
44 transform.localRotation = Quaternion.identity * Quaternion.Euler(node.yaw_test * node.allowed_yaw, node.pitch_test * node.allowed_pitch, node.roll_test * node.allowed_roll);
46 transform.position = node.transform.position - (grab_point.position - transform.position);
49 animator.SetLayerWeight(1, 1.0f);
50 animator.SetLayerWeight(2, 1.0f);
51 animator.SetLayerWeight(3, 1.0f);
52 animator.SetLayerWeight(4, 1.0f);
53 animator.SetLayerWeight(5, 1.0f);
55 animator.Play(
"Proc_IndexFinger", 1, node.index_pose);
56 animator.Play(
"Proc_MiddleFinger", 2, node.middle_pose);
57 animator.Play(
"Proc_RingFinger", 3, node.ring_pose);
58 animator.Play(
"Proc_PinkyFinger", 4, node.pinky_pose);
59 animator.Play(
"Proc_ThumbFinger", 5, node.thumb_pose);
60 animator.Update(0.0f);
Sets the documentation html file inside of Packages/com.avr.core/Documentation/html of a given class...
Simplest GrabProvider. Grabbed objects will move their center (obj.transform.position) towards the re...
Represents a grabbable node on an AVR_Grabbable. Nodes have preset poses/constraints for the hand tha...
In-editor drawn hand for setting up GrabNodes.