DontGoThroughObjects
A class in Root.Township, the global namespace.
Anti-tunnelling component: each physics step it raycasts along the rigidbody's movement and pulls it back to the first solid hit.
- Listed in Global namespace: C to D
- Inherits or implements
MonoBehaviour
Constructors
| Member | What it is |
|---|---|
DontGoThroughObjects() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
| Member | What it is |
|---|---|
LayerMask layerMask | Layers the raycast checks. |
bool sendTriggerMessage | Not used by this code. |
float skinWidth | Fraction of the minimum extent taken off when placing the body before a hit. |