|
group2 0.1.0
CSE 125 Group 2
|
Per-frame state required to compute the rotational pull as a delta between frames. More...
#include <GamepadAimAssistSystem.hpp>
Public Attributes | |
| entt::entity | lastTarget = entt::null |
| Target locked-onto last frame (entt::null when none). | |
| glm::vec3 | anchorLocal {0.0f} |
| Anchor offset from the target's Position.value in world axes. | |
| glm::vec3 | lastTargetPos {0.0f} |
| Target's world position last frame — combined with the (then-) anchorLocal to recover where the anchor was in world space. | |
| glm::vec3 | lastEye {0.0f} |
| Local player's eye position last frame. | |
| bool | initialised = false |
| False until we have one completed frame of history for the current target. | |
Per-frame state required to compute the rotational pull as a delta between frames.
Owned by Game; passed by reference into runGamepadAimAssist. Never serialised — purely local presentation.
| glm::vec3 systems::GamepadAimAssistState::anchorLocal {0.0f} |
Anchor offset from the target's Position.value in world axes.
Updated each frame to where the player's camera ray intersects (or is closest to) the target's AABB. Stays inside the AABB.
| bool systems::GamepadAimAssistState::initialised = false |
False until we have one completed frame of history for the current target.
Skips the angular-delta step on acquisition (no previous frame to subtract).
| glm::vec3 systems::GamepadAimAssistState::lastEye {0.0f} |
Local player's eye position last frame.
Including this in the angular-delta calculation lets the pull respond to the player's own translation too — exactly what the user asked for.
| entt::entity systems::GamepadAimAssistState::lastTarget = entt::null |
Target locked-onto last frame (entt::null when none).
Used to detect target-switch and re-initialise the anchor.
| glm::vec3 systems::GamepadAimAssistState::lastTargetPos {0.0f} |
Target's world position last frame — combined with the (then-) anchorLocal to recover where the anchor was in world space.