RealDocs

ACharacter::K2_OnStartCrouch

function Engine Blueprint Since 4.0
#include "GameFramework/Character.h"
Access: public Specifiers: BlueprintImplementableEvent

Description

Blueprint event fired when the character begins crouching. Implement this event in Blueprint subclasses to react to the crouch, such as lowering a camera, playing a crouch-start animation montage, or triggering audio.

Caveats & Gotchas

  • The underlying capsule resizing and mesh repositioning from `OnStartCrouch` has already occurred by the time this event fires. Use the provided `HalfHeightAdjust` values rather than querying the capsule yourself, as the capsule is already at its crouched size.
  • In Blueprint, this event appears as 'OnStartCrouch' due to the `DisplayName` meta specifier. Searching for 'K2_OnStartCrouch' in Blueprint will yield no results.

Signature

ENGINE_API void K2_OnStartCrouch(float HalfHeightAdjust, float ScaledHalfHeightAdjust)

Parameters

Name Type Description Default
HalfHeightAdjust float Difference between the default capsule half-height and the crouched capsule half-height.
ScaledHalfHeightAdjust float The half-height difference after the component scale is applied.

Return Type

void

Example

Blueprint implementation to lower camera on crouch text
// In a Blueprint subclass of ACharacter:
// Event OnStartCrouch (HalfHeightAdjust, ScaledHalfHeightAdjust)
//   → Set Relative Location (CameraComponent, Z = 20.0)  [crouched eye height]

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.