Struct StoredKinematicCharacterData
Stores all the data that a character might need to access on OTHER characters during its update. This component exists only in order to allow deterministic parallel execution of the character update.
Inherited Members
Namespace: Unity.CharacterController
Syntax
[Serializable]
public struct StoredKinematicCharacterData : IComponentData, IQueryTypeParameter
Fields
Mass
The mass used to simulate dynamic body interactions
Declaration
public float Mass
Field Value
Type | Description |
---|---|
Single |
ParentVelocity
The calculated velocity of the character's parent
Declaration
public float3 ParentVelocity
Field Value
Type | Description |
---|---|
float3 |
RelativeVelocity
The character's velocity relatively to its assigned parent's velocity (if any)
Declaration
public float3 RelativeVelocity
Field Value
Type | Description |
---|---|
float3 |
SimulateDynamicBody
Enables physics interactions (push and be pushed) with other dynamic bodies. Note that in order to be pushed properly, the character's collision response has to be either "None" or "Raise Trigger Events"
Declaration
public bool SimulateDynamicBody
Field Value
Type | Description |
---|---|
Boolean |
Methods
SetFrom(in KinematicCharacterProperties, in KinematicCharacterBody)
Automatically sets the data in this component based on a character body and character properties component
Declaration
public void SetFrom(in KinematicCharacterProperties characterProperties, in KinematicCharacterBody characterBody)
Parameters
Type | Name | Description |
---|---|---|
KinematicCharacterProperties | characterProperties | A character properties component to get data from |
KinematicCharacterBody | characterBody | A character body component to get data from |