isle-portable/LEGO1
foxtacles be65af4550
Camera relative movement (#15)
* Decouple 3rd person camera from player movement

Arrow keys now move the player relative to the camera direction instead
of using tank controls. The camera stays static unless explicitly
controlled via right-click drag, mouse wheel, or touch gestures.

Adds a single hook in CalculateNewPosDir that lets the extension take
over movement computation. The extension manages its own velocity
smoothing, computes camera-relative directions from an absolute yaw,
and writes nav controller velocities via friend class access.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Clean up ThirdPersonCamera: remove dead m_orbitYaw, extract helpers

Remove m_orbitYaw (always DEFAULT_ORBIT_YAW) and pass yaw directly to
ComputeOrbitVectors, eliminating save/restore blocks at all call sites.
Extract GetLocalYaw() and InitAbsoluteYaw() helpers to deduplicate
repeated atan2 patterns. Simplify SetupCamera by passing DEFAULT_ORBIT_YAW
directly. Move TURN_RATE constant to file scope.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Hide cursor while orbiting 3rd person camera with right mouse button

Move SDL event handling from LegoInputManager::UpdateLastInputMethod to
an exported function called at the end of SDL_AppEvent, so cursor state
changes aren't overridden by isleapp's SDL_ShowCursor(). Use
SDL_SetWindowRelativeMouseMode to hide the cursor and freeze its position
while the right mouse button is held in 3rd person camera mode.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 04:26:23 +01:00
..
lego Camera relative movement (#15) 2026-03-11 04:26:23 +01:00
modeldb
mxdirectx Plug leaks until Information Center, detected by the LeakSanitizer (#764) 2026-01-04 03:35:42 +01:00
mxgeometry Merge remote-tracking branch 'isle/master' 2025-09-12 12:35:22 -07:00
mxstl
omni Update miniaudio to 0.11.24 (#774) 2026-01-30 19:42:06 -08:00
realtime Merge remote-tracking branch 'isle/master' 2026-01-30 17:06:10 -08:00
res
tgl Plug memory leaks while moving around in the Information Center (#768) 2026-01-06 04:17:23 +01:00
viewmanager Merge remote-tracking branch 'isle/master' 2026-01-07 16:39:54 -07:00
cursor.h Make draw cursor feature work for modern platforms (#480) 2025-07-03 18:05:46 +02:00
define.cpp
define.h
lego1_export.h
lego1_pch.h Merge remote-tracking branch 'isle/master' 2026-01-30 17:06:10 -08:00
library_msvc.h Beta match LegoLOD and related classes (#1704) 2026-01-05 23:45:36 +01:00
library_smack.h
library_smartheap.h Add SmartHeap for LEGO1 (#1694) 2025-10-12 07:36:36 +02:00
main.cpp