A class in Root.Township, Alta.Inventory.
StabilizeJointContainer for lanterns. In a physical dock it joins the lantern to the dock's root rigidbody and passes grabs through to the root pickup.
Constructors
| Member | What it is |
|---|
StabilizeLantern() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
3 private and internal fields
| Member | What it is |
|---|
private Vector3 baseAnchor | Joint anchor saved before docking. |
private Vector3 baseConnectedAnchor | Joint connected anchor saved before docking. |
private Collider[] collidersToKeepOnPhysical | Colliders handed to the root pickup while in a physical dock. |
Methods
| Member | What it is |
|---|
protected override void Docked(Interactor interactor, Pickup pickup, PickupDock dock) | In a physical dock, connects the joint to the root rigidbody, moves the kept colliders to the root pickup and follows its docking. |
protected override void Undocked(Interactor interactor, Pickup pickup, PickupDock dock) | Undoes Docked: restores the joint anchors and colliders and unhooks the root pickup. |
3 private and internal methods
| Member | What it is |
|---|
private void DockDocked(Interactor interactor, Pickup pickup, PickupDock dock) | When the root pickup is docked, adds it to this pickup's ForwardTo. |
private void DockUndocked(Interactor interactor, Pickup pickup, PickupDock dock) | When the root pickup is undocked, removes it from ForwardTo. |
private void SetCollidersIgnore(Pickup pickupToIgnore, bool isIgnoring) | Turns collision on or off between the kept colliders and another pickup's colliders. |