Struct KinematicCharacterHit
Data representing a detected character hit
Inherited Members
Namespace: Unity.CharacterController
Syntax
[Serializable]
[InternalBufferCapacity(0)]
public struct KinematicCharacterHit : IBufferElementData
Fields
CharacterVelocityAfterHit
The character's velocity after velocity projection on this hit
Declaration
public float3 CharacterVelocityAfterHit
Field Value
Type | Description |
---|---|
float3 |
CharacterVelocityBeforeHit
The character's velocity before velocity projection on this hit
Declaration
public float3 CharacterVelocityBeforeHit
Field Value
Type | Description |
---|---|
float3 |
ColliderKey
Hit collider key
Declaration
public ColliderKey ColliderKey
Field Value
Type | Description |
---|---|
ColliderKey |
Entity
Hit entity
Declaration
public Entity Entity
Field Value
Type | Description |
---|---|
Entity |
IsGroundedOnHit
Whether or not the character would consider itself grounded on this hit
Declaration
public bool IsGroundedOnHit
Field Value
Type | Description |
---|---|
Boolean |
Material
The hit physics material
Declaration
public Material Material
Field Value
Type | Description |
---|---|
Material |
Normal
Hit normal
Declaration
public float3 Normal
Field Value
Type | Description |
---|---|
float3 |
Position
Hit point
Declaration
public float3 Position
Field Value
Type | Description |
---|---|
float3 |
RigidBodyIndex
Hit rigidbody index
Declaration
public int RigidBodyIndex
Field Value
Type | Description |
---|---|
Int32 |
WasCharacterGroundedOnHitEnter
Whether or not the character was grounded when the hit was detected
Declaration
public bool WasCharacterGroundedOnHitEnter
Field Value
Type | Description |
---|---|
Boolean |