A class in Root.Township, the global namespace.
Keeps re-checking the grip on a held pickup every frame while it is held, without letting that move the object.
Constructors
| Member | What it is |
|---|
UpdateGripEachFrame() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
1 private and internal field
| Member | What it is |
|---|
private Pickup pickup | The pickup on this object. |
Methods
3 private and internal methods
| Member | What it is |
|---|
private void Awake() | Hooks the pickup's grab event. |
private void InteractionStarted(Interactable interactable, Interactor interactor) | Turns the component on when the pickup is grabbed. |
private void Update() | For each holder, tries a grab change and then restores the transform; turns itself off when nobody holds it. |