Player Hands
scripts/vscripts/alyxlib/player/hands.lua
Methods
MergeProp
Merge an existing prop with this hand.
Parameters
prop
EntityHandle,string
The prop handle or targetname.hide_hand
boolean
If the hand should turn invisible after merging.
IsHoldingItem
Return true if this hand is currently holding a prop.
Returns
- boolean
Drop
Drop the item held by this hand.
Returns
- EntityHandle?
GetGlove
Get the rendered glove entity for this hand, i.e. the first hlvr_prop_renderable_glove class.
Returns
- EntityHandle|nil
GetGrabbityGlove
Get the entity for this hands grabbity glove (the animated part on the glove).
Returns
- EntityHandle|nil
IsButtonPressed
Returns true if the digital action is on for this. See ENUM_DIGITAL_INPUT_ACTIONS for action index values.
Note: Only reports input when headset is awake. Will still transmit input when controller loses tracking.
Parameters
digitalAction
DigitalInputAction
Returns
- boolean
GetPalmPosition
Get the position of the palm of this hand.
Returns the palm of the glove if it exists, otherwise the palm of the invisible hand. Sometimes the glove becomes desynchronized with the hand, such as interacting with a handpose or holding a weapon, so this function will try to return the position of the visible palm whenever possible.
Returns
- Vector
GetHandUseController
Gets the 'hand_use_controller' entity associated with this hand.
Returns
- EntityHandle
Drop
Forces the player to drop this entity if held.
Parameters
self
CBaseEntity
Grab
Force the player to grab this entity with a hand. If no hand is supplied then the nearest hand will be used.
Parameters
hand(optional)
CPropVRHand,0,1