We got GameObjects / Components and shit

This commit is contained in:
2026-01-10 06:09:50 +01:00
parent 10b00b0525
commit 0bfc5e0705
35 changed files with 1546 additions and 331 deletions

View File

@@ -65,8 +65,8 @@ void Camera::Update(float deltaTime) {
// SDL controller triggers are axes too: 0..1-ish after normalization in our helper, but signless.
// With our NormalizeAxis, triggers will sit near 0 until pressed (depending on mapping).
// If your NormalizeAxis maps triggers weirdly, swap to raw event value approach.
const float lt = input.GetPadAxis(pad0, SDL_CONTROLLER_AXIS_TRIGGERLEFT);
const float rt = input.GetPadAxis(pad0, SDL_CONTROLLER_AXIS_TRIGGERRIGHT);
const float lt = input.GetPadAxis(pad0, SDL_CONTROLLER_AXIS_TRIGGERRIGHT);
const float rt = input.GetPadAxis(pad0, SDL_CONTROLLER_AXIS_TRIGGERLEFT);
const float vertical = (rt - lt);
padMove += m_up * vertical;
@@ -96,7 +96,7 @@ void Camera::Update(float deltaTime) {
const float padLookSpeed = 2.2f; // radians/sec at full deflection
m_yaw += rx * padLookSpeed * deltaTime;
m_pitch -= ry * padLookSpeed * deltaTime;
m_pitch += ry * padLookSpeed * deltaTime;
}
// Clamp pitch again after modifications