Equivalent to AVR_OffsetGrabProvider, but additionally allows for hand-to-object grab mode to be used. More...
Public Member Functions | |
override Vector3 | getTargetPosition () |
Target position the grabbed object should "strive" towards in world coordiantes. There will be force pulling getWorldGrabPosition and getTargetPosition together. More... | |
override Quaternion | getTargetRotation () |
Target rotation the grabbed object should "strive" towards in world space. There will be force trying to make the objects rotation and this rotation equal. More... | |
override Transform | getTargetTransform () |
getTargetPosition() and getTargetRotation() combined into one transform. The grabbed objects transform will strive to adopt these values over time. More... | |
override void | makeGrab (GrabLocation location) |
Perform a grab on with parameters given in a GrabLocation struct More... | |
override void | makeRelease () |
Ends a grab. Is called when the respective "releaseEvent" is true. More... | |
Public Member Functions inherited from AVR.Phys.AVR_OffsetGrabProvider | |
override Vector3 | getTargetPosition () |
Target position the grabbed object should "strive" towards in world coordiantes. There will be force pulling getWorldGrabPosition and getTargetPosition together. More... | |
override Quaternion | getTargetRotation () |
Target rotation the grabbed object should "strive" towards in world space. There will be force trying to make the objects rotation and this rotation equal. More... | |
override Transform | getTargetTransform () |
getTargetPosition() and getTargetRotation() combined into one transform. The grabbed objects transform will strive to adopt these values over time. More... | |
override void | makeRelease () |
Ends a grab. Is called when the respective "releaseEvent" is true. More... | |
override void | makeGrab (GrabLocation location) |
Perform a grab on with parameters given in a GrabLocation struct More... | |
Public Member Functions inherited from AVR.Phys.AVR_BasicGrabProvider | |
AVR_Grabbable | getGrabbedObject () |
Object that is currently being grabbed. Null if no object is being grabbed More... | |
virtual Vector3 | getLocalGrabLocation () |
Offset at which an object is being grabbed. Meaning: grab-position in local coordiantes relative to the grabbed object. For instance: If we grab a Pan by its handle, this value will correspond to the pans handle in local coordiantes. If no object is grabbed, returns Vector3.zero. More... | |
virtual Vector3 | getWorldGrabLocation () |
Location at which the object is being grabbed in world coordinates. Example: If we grab a pan by its handle, the handles world coordinates will correspond to this. Returns Vector3.zero if no object is being grabbed. More... | |
virtual void | makeGrab () |
Performs a grab on whichever object the GrabbableFinder returns. Is called when the respective "grabEvent" is true. More... | |
Public Member Functions inherited from AVR.Core.AVR_Behaviour | |
virtual void | OnDestroy () |
Protected Member Functions | |
override void | Start () |
override void | Update () |
override IEnumerator | setHand () |
override IEnumerator | unsetHand () |
Protected Member Functions inherited from AVR.Phys.AVR_OffsetGrabProvider | |
override void | Start () |
override void | Update () |
Protected Member Functions inherited from AVR.Core.AVR_ControllerComponent | |
override void | Awake () |
Protected Member Functions inherited from AVR.Core.AVR_Component | |
virtual void | OnEnable () |
virtual void | OnDisable () |
Private Attributes | |
Transform | virtualGrabPoint |
Vector3 | lastPos |
float | distance_travelled_since_grab = 0f |
float | normalization_distance = 0.5f |
Vector3 | pos_offset |
Quaternion | rot_offset |
Additional Inherited Members | |
Public Attributes inherited from AVR.Phys.AVR_OffsetGrabProvider | |
AVR_Hand | handVisual |
HandVisual More... | |
Public Attributes inherited from AVR.Phys.AVR_BasicGrabProvider | |
UnityEvent | OnGrab |
Executed when an object is (successfully) grabbed. More... | |
UnityEvent | OnRelease |
Executed when a grabbed object is released. More... | |
bool | isGrabbing => grabbedObject != null |
Returns true if this provider is currently grabbing an object. More... | |
AVR_ControllerInputManager.BoolEvent | grabEvent |
Event that commences a grab. (Such as ONTRIGGERDOWN) More... | |
AVR_ControllerInputManager.BoolEvent | releaseEvent |
Event that ends a grab. (Such as ONTRIGGERUP) More... | |
Transform | grabPoint |
Transform of the location an object is grabbed towards (Typically the palm of your hand). Will be set automatically to the local transfrom if null. More... | |
AVR_GrabbableFinder | grabbableFinder |
Area from which the player may grab an object. Required for the grabprovider to work. 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 Attributes inherited from AVR.Phys.AVR_BasicGrabProvider | |
AVR_Grabbable | grabbedObject => grabLocation!=null ? grabLocation.grabbable : null |
Object that is currently being grabbed. Null if no object is being grabbed More... | |
GrabLocation | grabLocation |
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... | |
Properties inherited from AVR.Core.AVR_ControllerComponent | |
AVR_Controller | controller [get, set] |
Equivalent to AVR_OffsetGrabProvider, but additionally allows for hand-to-object grab mode to be used.
Definition at line 10 of file AVR_AdvancedOffsetGrabProvider.cs.