VR Development Framework
v 1.0.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
void AVR.Phys.AVR_DebugHand.Start ( )
inlineprivate

Definition at line 19 of file AVR_DebugHand.cs.

20  {
21  if(Application.isPlaying) {
22  GameObject.DestroyImmediate(gameObject);
23  }
24 
25  if(!grab_point) {
26  grab_point = AVR.Core.Utils.Misc.CreateEmptyGameObject("GrabPoint", transform);
27  }
28 
29  try {
30  AVR_BasicGrabProvider gp = FindObjectOfType<AVR_BasicGrabProvider>();
31 
32  grab_point.localPosition = gp.transform.InverseTransformPoint(gp.grabPoint.position);
33  } catch(System.Exception) { }
34 
35  node = GetComponentInParent<AVR_GrabNode>();
36 
37  transform.position = transform.parent.position - (grab_point.position - transform.position);
38  }