vkmEngine 1.0.0
A C++ game engine · vkmengine.com
Loading...
Searching...
No Matches
Vkm::Engine::InputCommand Struct Reference

Everything one simulation tick was told to do, as a value. More...

#include <input_command.h>

Public Attributes

uint32_t sequence = 0
 Monotonic command number; what an ack names.
uint32_t tick = 0
 Simulation tick this command drives.
std::array< float, MAX_INPUT_ACTIONS > axis {}
 Per-action value, -1..1, indexed by InputMap::indexOf.
uint32_t pressed = 0
 Bit per action: became active since the last command.
uint32_t released = 0
 Bit per action: stopped being active since the last command.
glm::quat view {1.0f, 0.0f, 0.0f, 0.0f}
 Where the player was looking when this input was taken.

Detailed Description

Everything one simulation tick was told to do, as a value.

Built per tick from the axes as they stand and the edges latched since the previous one, so a fixed update neither drops a tap between ticks nor repeats a press across a slow frame's ticks. sequence and tick differ because a replay re-runs old ticks under their original sequence.

Member Data Documentation

◆ view

glm::quat Vkm::Engine::InputCommand::view {1.0f, 0.0f, 0.0f, 0.0f}

Where the player was looking when this input was taken.

Carried so a tick's movement depends on its command alone, not on a camera that has since moved. A quaternion, so there is no Euler convention; identity (looking down -Z) until set.


The documentation for this struct was generated from the following file: