A class in Root.Township, the global namespace.
Impact shape asset that collects colliders inside an upright cylinder above the hit point. Used for area effects in progression and impacts.
Constructors
| Member | What it is |
|---|
CylinderImpactCollector() | Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets. |
Fields
3 private and internal fields
| Member | What it is |
|---|
private float height | Cylinder height above the hit point. |
private float radiusSquared | Cylinder radius squared (entered as a plain radius in the inspector). |
private float sphereRadius | Radius of the sphere enclosing the cylinder, used for the first overlap test. |
Properties
| Member | What it is |
|---|
override float SizeSquared { get; } | The cylinder's radius squared. |
Methods
| Member | What it is |
|---|
override IEnumerable<Collider> CollectColliders(ImpactHitWithTool hit, LayerMask collectionLayer) (iterator) | Overlap-sphere around the cylinder, then keeps colliders whose position is within its height and radius from the hit point. |
override void DrawGizmos() | Draws the bounding sphere and the cylinder. |
1 private and internal method
| Member | What it is |
|---|
private void OnValidate() | Recomputes sphereRadius from the radius and height. |