VR Development Framework
v 1.0.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
void AVR.UEditor.Phys.AVR_GrabNode_Editor.OnSceneGUI ( )
inline

Definition at line 40 of file AVR_GrabNodeEditor.cs.

41  {
42  AVR_GrabNode node = (AVR_GrabNode)target;
43 
44  const float angle_arches_size = 0.12f;
45 
46  Handles.color = new Color(0, 1, 0, 0.3f);
47  Handles.DrawSolidArc(node.transform.position, node.transform.up, node.transform.forward, node.allowed_pitch, angle_arches_size);
48  Handles.DrawSolidArc(node.transform.position, node.transform.up, node.transform.forward, -node.allowed_pitch, angle_arches_size);
49 
50  Handles.color = new Color(0, 0, 1, 0.3f);
51  Handles.DrawSolidArc(node.transform.position, node.transform.forward, node.transform.right, node.allowed_roll, angle_arches_size);
52  Handles.DrawSolidArc(node.transform.position, node.transform.forward, node.transform.right, -node.allowed_roll, angle_arches_size);
53 
54  Handles.color = new Color(1, 0, 0, 0.3f);
55  Handles.DrawSolidArc(node.transform.position, node.transform.right, node.transform.up, node.allowed_yaw, angle_arches_size);
56  Handles.DrawSolidArc(node.transform.position, node.transform.right, node.transform.up, -node.allowed_yaw, angle_arches_size);
57 
58  Handles.color = Color.yellow;
59  const int circle_res = 4;
60  for(int i=0; i<circle_res; i++) {
61  float fac = ((float)i / circle_res);
62  Handles.DrawWireDisc(node.transform.position, fac * node.transform.right + (1f - fac) * node.transform.forward, node.override_radius);
63  Handles.DrawWireDisc(node.transform.position, fac * -node.transform.right + (1f - fac) * node.transform.forward, node.override_radius);
64  }
65  Handles.DrawWireDisc(node.transform.position, node.transform.up, node.override_radius);
66  }
Represents a grabbable node on an AVR_Grabbable. Nodes have preset poses/constraints for the hand tha...
Definition: AVR_GrabNode.cs:15