Struct BasicHit
A common hit struct for cast hits and distance hits
Inherited Members
Namespace: Unity.CharacterController
Syntax
[Serializable]
public struct BasicHit
Constructors
BasicHit(KinematicCharacterHit)
Constructs a basic hit from a character hit
Declaration
public BasicHit(KinematicCharacterHit hit)
Parameters
Type | Name | Description |
---|---|---|
KinematicCharacterHit | hit | Character hit |
BasicHit(KinematicVelocityProjectionHit)
Constructs a basic hit from a velocity projection hit
Declaration
public BasicHit(KinematicVelocityProjectionHit hit)
Parameters
Type | Name | Description |
---|---|---|
KinematicVelocityProjectionHit | hit | Velocity projection hit |
BasicHit(ColliderCastHit)
Constructs a basic hit from a collider cast hit
Declaration
public BasicHit(ColliderCastHit hit)
Parameters
Type | Name | Description |
---|---|---|
ColliderCastHit | hit | Collider cast hit |
BasicHit(DistanceHit)
Constructs a basic hit from a distance hit
Declaration
public BasicHit(DistanceHit hit)
Parameters
Type | Name | Description |
---|---|---|
DistanceHit | hit | Distance hit |
BasicHit(RaycastHit)
Constructs a basic hit from a raycast hit
Declaration
public BasicHit(RaycastHit hit)
Parameters
Type | Name | Description |
---|---|---|
RaycastHit | hit | Raycast 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 |
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 |