Skip to main content

ToggleKinematicLogic

A class in Root.Township, the global namespace.

Small component with methods to turn its rigidbody's isKinematic on or off, for wiring to UnityEvents.

Constructors​

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

Fields​

1 private and internal field
MemberWhat it is
private Rigidbody rigidbodyThe rigidbody on this object.

Methods​

MemberWhat it is
void KinematicOff()Sets the rigidbody non-kinematic, so physics moves it.
void KinematicOn()Sets the rigidbody kinematic.
1 private and internal method
MemberWhat it is
private void Awake()Gets the rigidbody on the same object.

Used in​

Members of other types that take, return or hold a ToggleKinematicLogic: