Skip to main content

SecondaryCollisionCheck

A class in Root.Township, the global namespace.

Added to a held pickup by the local holder. When it hits another networked rigidbody, takes authority over it and reports the hit. Removes itself once nobody holds the pickup.

Constructors​

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

Fields​

1 private and internal field
MemberWhat it is
private Pickup pickupThe held pickup on the same object.

Methods​

3 private and internal methods
MemberWhat it is
private void Awake()Hooks the pickup's interaction ended event.
private void DestroyCollisionCheck(Interactable interactable, Interactor interactor)Removes this component once the pickup has no interactors.
private void OnCollisionEnter(Collision collision)On hitting a NetworkRigidbody, lerps its authority to this client and sends a secondary collision through the pickup's rigidbody.