Struct KinematicVelocityProjectionHit
Holds the data for hits that participate in velocity projection
Inherited Members
Namespace: Unity.CharacterController
Syntax
[Serializable]
[InternalBufferCapacity(0)]
public struct KinematicVelocityProjectionHit : IBufferElementData
Constructors
KinematicVelocityProjectionHit(BasicHit, Boolean)
Constructs the velocity projection hit based on a basic hit and grounding status
Declaration
public KinematicVelocityProjectionHit(BasicHit hit, bool isGroundedOnHit)
Parameters
Type | Name | Description |
---|---|---|
BasicHit | hit | A basic hit |
Boolean | isGroundedOnHit | Whether or not the character is grounded on this hit |
KinematicVelocityProjectionHit(KinematicCharacterHit)
Constructs the velocity projection hit based on a character hit
Declaration
public KinematicVelocityProjectionHit(KinematicCharacterHit hit)
Parameters
Type | Name | Description |
---|---|---|
KinematicCharacterHit | hit | A character hit |
KinematicVelocityProjectionHit(float3, float3, Boolean)
Constructs the velocity projection hit based on a basic hit and grounding status
Declaration
public KinematicVelocityProjectionHit(float3 normal, float3 position, bool isGroundedOnHit)
Parameters
Type | Name | Description |
---|---|---|
float3 | normal | The hit normal |
float3 | position | The hit point |
Boolean | isGroundedOnHit | Whether or not the character is grounded on this hit |
Fields
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
Hit 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 |