Skip to content

IdleTurningState ​

Inherits: MovementState < RefCounted

Turn-in-place animation while the entity turns without moving. Entry and exit are decided by MovementStateComponent._check_state_transitions via Entity.is_turning(); this state only plays the animation and keeps its blend direction current.

Variables ​

floattarget_turn_direction0.0

Methods ​

voidenter()
voidexit()
voidprocess_turn_state( _delta: float )

Variable descriptions ​

float target_turn_direction = 0.0 ​

The direction of the turn (negative is left).

Method descriptions ​

void enter() ​

The entity turns in place: plays the turn animation.

void exit() ​

Stops the turn animation.

void process_turn_state( _delta: float ) ​

Called every physics tick while this state is active (MovementStateComponent.process_movement). Mouse-look can reverse direction without leaving the state, so refresh the blend position.