Free Camera (#337)

* wip free cam

* Almost done, needs collision still

* Added free cam behind cvar

* added WIP collision

* Fixed & implemented "Manual mode" from WW & TP

* Fixed camera not rotating when Link is moving

* fixed initialized camera rotation

* Fixed camera getting stuck + made it smoother

* reduced deadzone

* fixed epona camera height + added WW z-target free camera

* Adjusted player camera height & fixed fov

* Fixed camera roll

* fixed fov when moving the camera while in z-target

* Camera resets to Auto when going through doors or changing maps

* Fixed building

* touch

* more touch work

* Added WIP mouse support to the free cam

* gui stuff

* fixed building

* fixed building error

* ok fixed building for real this time

* oops

* Fix compilation issues

* removed mouse stuff that magically appeared in this branch

* smoothed out stick values & removed remains of mouse support

* re-added manual camera when pressing Z

* reduced minimum Y position of camera

* Addressed dcsv's nitpicks

* part 2

* oops

Co-authored-by: David Chavez <david@dcvz.io>
This commit is contained in:
MelonSpeedruns 2022-07-12 18:40:18 -04:00 committed by GitHub
parent 3aa93b9855
commit 66ec623542
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 221 additions and 20 deletions

View file

@ -530,6 +530,10 @@ void Gameplay_Update(GlobalContext* globalCtx) {
ActorOverlayTable_LogPrint();
}
if (CVar_GetS32("gFreeCamera", 0) && Player_InCsMode(globalCtx)) {
globalCtx->manualCamera = false;
}
gSegments[4] = VIRTUAL_TO_PHYSICAL(globalCtx->objectCtx.status[globalCtx->objectCtx.mainKeepIndex].segment);
gSegments[5] = VIRTUAL_TO_PHYSICAL(globalCtx->objectCtx.status[globalCtx->objectCtx.subKeepIndex].segment);
gSegments[2] = VIRTUAL_TO_PHYSICAL(globalCtx->sceneSegment);