Represents a grabbable object. More...
Public Member Functions | |
void | Grab (AVR_BasicGrabProvider hand) |
void | Release (AVR_BasicGrabProvider hand) |
Public Member Functions inherited from AVR.Core.AVR_Behaviour | |
virtual void | OnDestroy () |
Public Attributes | |
GrabbableObjectType | objectType |
Type that describes the objects behaviour when grabbed. More... | |
List< AVR_GrabNode > | grabNodes => nodes |
List of GrabNodes that are attatched to this object More... | |
Rigidbody | rb |
Rigidbody of this grabbable object. More... | |
AudioSource | source |
Optional AudioSource to play sounds from GrabbableObjectType data More... | |
List< Collider > | colliders = new List<Collider>() |
List of colliders that describe the outer/grabbable surface. All colliders must be convex. More... | |
List< AVR_BasicGrabProvider > | AttachedHands = new List<AVR_BasicGrabProvider>() |
List of hands that are currently grabbing this object. More... | |
Public Attributes inherited from AVR.Core.AVR_Component | |
UnityEngine.Events.UnityEvent | onAwake |
Events called when this component awakes. More... | |
UnityEngine.Events.UnityEvent | onStart |
Events called when this component starts. More... | |
UnityEngine.Events.UnityEvent | onEnable |
Events called when this component is enabled. More... | |
UnityEngine.Events.UnityEvent | onDisable |
Events called when this component is disabled. More... | |
Protected Member Functions | |
override void | Awake () |
Protected Member Functions inherited from AVR.Core.AVR_Component | |
virtual void | Start () |
virtual void | OnEnable () |
virtual void | OnDisable () |
Properties | |
bool | isGrabbed [get] |
True if the object is being grabbed, otherwise false. More... | |
bool | isGrabbedByMultipleHands [get] |
True if the object is being grabbed by 2 or more hands, otherwise false. More... | |
Private Member Functions | |
void | Reset () |
void | FixedUpdate () |
void | UpdateRBVelocity () |
Vector3 | getTargetPosition () |
Quaternion | getTargetRotation () |
void | OnCollisionEnter (Collision collision) |
Private Attributes | |
GrabbableObjectType | _objType |
readonly List< AVR_GrabNode > | nodes = new List<AVR_GrabNode>() |
Transform | old_parent |
List< Vector3 > | velocities = new List<Vector3>() |
const int | velocity_count = 3 |
float | last_dist = 0.0f |
Vector3 | lastVel = Vector3.zero |
Vector3 | wacc = Vector3.zero |
Vector3 | worldvel = Vector3.zero |
Vector3 | force = Vector3.zero |
Vector3 | cvel = Vector3.zero |
Additional Inherited Members | |
Protected Attributes inherited from AVR.Core.AVR_Behaviour | |
AVR_PlayerRig | playerRig => AVR_PlayerRig.Instance |
The current AVR_PlayerRig instance in the scene More... | |
AVR_Root | root => AVR_Root.Instance |
The current AVR_Root instance in the scene More... | |
bool | vrEnabled => UnityEngine.XR.XRSettings.enabled |
True if the application is running as a VR/XR application More... | |
Represents a grabbable object.
Definition at line 11 of file AVR_Grabbable.cs.