LuaPlayer::analog_walking_state: a field containing direction and magnitude of player's walking state
Posted: Fri Aug 07, 2026 2:23 pm
Alternative name: LuaPlayer::vector_walking_state
This field makes it possible to determine the character's direction and magnitude of walking state. When using a keyboard, magnitude is always 1, but on a gamepad, magnitude is proprotional to the magnitude of the character's stick pitch from [0,0]. This field would help mods read the state of the player's analog walking state so that scripts that change based on the character's running speed and direction look correct when players use a gamepad.
This field would improve the experience of playing Muluna with a gamepad. Currently, walking at partial speed with an analog stick on Muluna results in walking particles being produced at the incorrect frequency. The walking particle frequency is currently based on LuaPlayer::character_running_speed, which prints the character's speed when using the maximum analog stick pitch, or when holding down a movement key.
This field makes it possible to determine the character's direction and magnitude of walking state. When using a keyboard, magnitude is always 1, but on a gamepad, magnitude is proprotional to the magnitude of the character's stick pitch from [0,0]. This field would help mods read the state of the player's analog walking state so that scripts that change based on the character's running speed and direction look correct when players use a gamepad.
This field would improve the experience of playing Muluna with a gamepad. Currently, walking at partial speed with an analog stick on Muluna results in walking particles being produced at the incorrect frequency. The walking particle frequency is currently based on LuaPlayer::character_running_speed, which prints the character's speed when using the maximum analog stick pitch, or when holding down a movement key.