Interface IControllerColliderHit
Interface to hold the data for a controller collider hit event. Wrapping this in an interface makes the testing of a controller collider hit easier to manage.
Namespace: nickmaltbie.OpenKCC.Utils
Assembly: cs.temp.dll.dll
Syntax
public interface IControllerColliderHit
Properties
collider
The collider that was hit by the controller.
Declaration
Collider collider { get; }
Property Value
Type | Description |
---|---|
Collider |
gameObject
The game object that was hit by the controller.
Declaration
GameObject gameObject { get; }
Property Value
Type | Description |
---|---|
GameObject |
moveDirection
The direction the CharacterController was moving in when the collision occurred.
Declaration
Vector3 moveDirection { get; }
Property Value
Type | Description |
---|---|
Vector3 |
moveLength
How far the character has travelled until it hit the collider.
Declaration
float moveLength { get; }
Property Value
Type | Description |
---|---|
Single |
normal
The normal of the surface we collided with in world space.
Declaration
Vector3 normal { get; }
Property Value
Type | Description |
---|---|
Vector3 |
point
The impact point in world space.
Declaration
Vector3 point { get; }
Property Value
Type | Description |
---|---|
Vector3 |
rigidbody
The rigidbody that was hit by the controller.
Declaration
Rigidbody rigidbody { get; }
Property Value
Type | Description |
---|---|
Rigidbody |
transform
The transform that was hit by the controller.
Declaration
Transform transform { get; }
Property Value
Type | Description |
---|---|
Transform |