Skip to main content

TriggerCapsule

A class in Root.Township, the global namespace.

A TriggerShape that adds its own capsule trigger collider when initialised from code.

Constructors​

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

Fields​

1 private and internal field
MemberWhat it is
private CapsuleCollider capsuleColliderThe capsule collider added by Initialize.

Properties​

MemberWhat it is
float Height { get; set; }The capsule's height, or 0 before Initialize.
float Radius { get; set; }The capsule's radius, or 0 before Initialize.

Methods​

MemberWhat it is
void Initialize(float radius, float height)Adds a trigger capsule collider with the given radius and height and renames the object.