We got GameObjects / Components and shit
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user