DistanceIntreactionHand
Description
Used to handle interactions with objects within a certain distance of the hand. It inherits from the InteractionHand class and overrides its StartInteraction and ProcessGrab methods.
Public methods
override void StartInteraction()
first calls the base class's StartInteraction method, then it calls the UpdateInteraction method
override void ProcessGrab()
calls the FindClosestGrabbable method which checks if there is any Grabbable object within the raycast distance, if it finds one it sets it as closestObject
if the shouldDrawLineRenderer is true, it calls the DrawLineRenderer method which draws the line renderer from the rayVisualSource to the closestObject position
it calls the GrabCheck method which checks if the hand can grab the closestObject.
Last updated