Struct AuthoringKinematicCharacterProperties
Defines the authoring data for kinematic character properties
Inherited Members
Namespace: Unity.CharacterController
Syntax
[Serializable]
public struct AuthoringKinematicCharacterProperties
Fields
CustomPhysicsBodyTags
Physics tags to be added to the character's physics body
Declaration
[Header("General Properties")]
[Tooltip("Physics tags to be added to the character's physics body")]
public CustomPhysicsBodyTags CustomPhysicsBodyTags
Field Value
Type | Description |
---|---|
CustomPhysicsBodyTags |
DecollideFromOverlaps
Enables detecting and solving overlaps
Declaration
[Tooltip("Enables detecting and solving overlaps")]
public bool DecollideFromOverlaps
Field Value
Type | Description |
---|---|
Boolean |
DetectMovementCollisions
Enables detecting and solving movement collisions with a collider cast, based on character's velocity
Declaration
[Header("Collisions")]
[Tooltip("Enables detecting and solving movement collisions with a collider cast, based on character's velocity")]
public bool DetectMovementCollisions
Field Value
Type | Description |
---|---|
Boolean |
DetectObstructionsForParentBodyMovement
Enables doing a collider cast to detect obstructions when being moved by a parent body, instead of simply moving the character transform along
Declaration
[Tooltip("Enables doing a collider cast to detect obstructions when being moved by a parent body, instead of simply moving the character transform along")]
public bool DetectObstructionsForParentBodyMovement
Field Value
Type | Description |
---|---|
Boolean |
DiscardMovementWhenExceedMaxIterations
Whether we should reset the remaining move distance to zero when the character exceeds the maximum collision iterations
Declaration
[Tooltip("Whether we should reset the remaining move distance to zero when the character exceeds the maximum collision iterations")]
public bool DiscardMovementWhenExceedMaxIterations
Field Value
Type | Description |
---|---|
Boolean |
EnhancedGroundPrecision
Computes a more precise distance to ground hits when the original query returned a distance of 0f due to imprecisions. Helps reduce jitter in certain situations, but can have an additional performance cost. It is recommended that you only enable this if you notice jitter problems when moving against angled walls
Declaration
[Tooltip("Computes a more precise distance to ground hits when the original query returned a distance of 0f due to imprecisions. Helps reduce jitter in certain situations, but can have an additional performance cost. It is recommended that you only enable this if you notice jitter problems when moving against angled walls")]
public bool EnhancedGroundPrecision
Field Value
Type | Description |
---|---|
Boolean |
EvaluateGrounding
Enables detecting ground and evaluating grounding for each hit
Declaration
[Header("Grounding")]
[Tooltip("Enables detecting ground and evaluating grounding for each hit")]
public bool EvaluateGrounding
Field Value
Type | Description |
---|---|
Boolean |
GroundSnappingDistance
Distance to snap to ground, if SnapToGround is enabled
Declaration
[Tooltip("Distance to snap to ground, if SnapToGround is enabled")]
public float GroundSnappingDistance
Field Value
Type | Description |
---|---|
Single |
InterpolatePosition
Enables interpolating the character's position between fixed update steps, for smoother movement
Declaration
[Tooltip("Enables interpolating the character's position between fixed update steps, for smoother movement")]
public bool InterpolatePosition
Field Value
Type | Description |
---|---|
Boolean |
InterpolateRotation
Enables interpolating the character's rotation between fixed update steps, for smoother movement. Note: the Standard Characters must keep this option disabled, because by default they all handle their rotation on regular update rather than fixed update
Declaration
[Tooltip("Enables interpolating the character's rotation between fixed update steps, for smoother movement. Note: the Standard Characters must keep this option disabled, because by default they all handle their rotation on regular update rather than fixed update")]
public bool InterpolateRotation
Field Value
Type | Description |
---|---|
Boolean |
KillVelocityWhenExceedMaxIterations
Whether we should reset the velocity to zero when the character exceeds the maximum collision iterations
Declaration
[Tooltip("Whether we should reset the velocity to zero when the character exceeds the maximum collision iterations")]
public bool KillVelocityWhenExceedMaxIterations
Field Value
Type | Description |
---|---|
Boolean |
Mass
The mass used to simulate dynamic body interactions
Declaration
[Tooltip("The mass used to simulate dynamic body interactions")]
public float Mass
Field Value
Type | Description |
---|---|
Single |
MaxContinuousCollisionsIterations
The maximum amount of times per frame that the character should try to cast its collider for detecting hits
Declaration
[Tooltip("The maximum amount of times per frame that the character should try to cast its collider for detecting hits")]
public byte MaxContinuousCollisionsIterations
Field Value
Type | Description |
---|---|
Byte |
MaxGroundedSlopeAngle
The max slope angle that the character can be considered grounded on
Declaration
[Tooltip("The max slope angle that the character can be considered grounded on")]
public float MaxGroundedSlopeAngle
Field Value
Type | Description |
---|---|
Single |
MaxOverlapDecollisionIterations
The maximum amount of times per frame that the character should try to decollide itself from overlaps
Declaration
[Tooltip("The maximum amount of times per frame that the character should try to decollide itself from overlaps")]
public byte MaxOverlapDecollisionIterations
Field Value
Type | Description |
---|---|
Byte |
ProjectVelocityOnInitialOverlaps
Enables doing an extra physics check to project velocity on initial overlaps before the character moves. This can help with tunneling issues when you rotate your character in a way that could change the detected collisions (which doesn't happen if your character has an upright capsule shape and only rotates around up axis, for example), but it has a performance cost.
Declaration
[Tooltip("Enables doing an extra physics check to project velocity on initial overlaps before the character moves. This can help with tunneling issues when you rotate your character in a way that could change the detected collisions (which doesn't happen if your character has an upright capsule shape and only rotates around up axis, for example), but it has a performance cost.")]
public bool ProjectVelocityOnInitialOverlaps
Field Value
Type | Description |
---|---|
Boolean |
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
[Header("Dynamics")]
[Tooltip("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\"")]
public bool SimulateDynamicBody
Field Value
Type | Description |
---|---|
Boolean |
SnapToGround
Enables snapping to the ground surface below the character
Declaration
[Tooltip("Enables snapping to the ground surface below the character")]
public bool SnapToGround
Field Value
Type | Description |
---|---|
Boolean |
Methods
GetDefault()
Gets a sensible default set of parameters for this struct
Declaration
public static AuthoringKinematicCharacterProperties GetDefault()
Returns
Type | Description |
---|---|
AuthoringKinematicCharacterProperties |