mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 07:40:14 +00:00
Fix taxi startup/attachment and reduce taxi streaming hitches
This commit is contained in:
parent
f752a4f517
commit
38cef8d9c6
11 changed files with 396 additions and 190 deletions
|
|
@ -112,17 +112,12 @@ void CameraController::update(float deltaTime) {
|
|||
return;
|
||||
}
|
||||
|
||||
// During taxi flights, skip input/movement logic but still position camera
|
||||
// During taxi flights, skip movement logic but keep camera orbit/zoom controls.
|
||||
if (externalFollow_) {
|
||||
// Mouse look (right mouse button)
|
||||
if (rightMouseDown) {
|
||||
int mouseDX, mouseDY;
|
||||
SDL_GetRelativeMouseState(&mouseDX, &mouseDY);
|
||||
yaw -= mouseDX * mouseSensitivity;
|
||||
pitch -= mouseDY * mouseSensitivity;
|
||||
pitch = glm::clamp(pitch, -89.0f, 89.0f);
|
||||
camera->setRotation(yaw, pitch);
|
||||
}
|
||||
camera->setRotation(yaw, pitch);
|
||||
float zoomLerp = 1.0f - std::exp(-ZOOM_SMOOTH_SPEED * deltaTime);
|
||||
currentDistance += (userTargetDistance - currentDistance) * zoomLerp;
|
||||
collisionDistance = currentDistance;
|
||||
|
||||
// Position camera behind character during taxi
|
||||
if (thirdPerson && followTarget) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue