Skip to main content

EmptyJoint

A class in Root.Township, the global namespace.

Added to a hand's interaction point by PickupJoints for the EmptyJoint grab type: no physical joint, it just turns off the pickup's network rigidbody while held.

Constructors​

MemberWhat it is
EmptyJoint()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

3 private and internal fields
MemberWhat it is
private Rigidbody connectedBodyRigidbody of the held pickup.
private NetworkRigidbody networkRigidbodyNetwork rigidbody on that body, disabled while held.
private Pickup pickupThe held pickup.

Properties​

MemberWhat it is
Controller Controller { get; private set; }Controller of the hand that grabbed the pickup.

Methods​

MemberWhat it is
void Initialize(Pickup pickup, Interactor interactor, Rigidbody connectedBody)Stores the grab, moves a NaN-positioned pickup to the hand, disables the network rigidbody and listens for the grab ending.
1 private and internal method
MemberWhat it is
private void PickupInteractionEnded(Interactable interactable, Interactor interactor)When this hand lets go and nobody else holds it, turns the network rigidbody back on (if undocked) and restores the max angular velocity.