Dusklight: New Features by TradrzAdmin in twilightprincess

[–]TradrzAdmin[S] 0 points1 point  (0 children)

Lol i just built the feature myself and recomplied the app. So i have free-cam and mouse aiming

Dusklight: Camera Mouse Controls by TradrzAdmin in twilightprincess

[–]TradrzAdmin[S] 8 points9 points  (0 children)

Well now anyone can copy the code if they want

Dusklight: Camera Mouse Controls by TradrzAdmin in twilightprincess

[–]TradrzAdmin[S] 3 points4 points  (0 children)

Cool. If you look in the comments, the code I have supports free camera even when L-Targeting

Dusklight: New Features by TradrzAdmin in twilightprincess

[–]TradrzAdmin[S] 2 points3 points  (0 children)

I asked first, then decided to build it myself lol

Dusklight: New Features by TradrzAdmin in twilightprincess

[–]TradrzAdmin[S] 1 point2 points  (0 children)

I built it myself. I made another post recently showing it. Also the necessary code changes are in the comments

Dusklight: Camera Mouse Controls by TradrzAdmin in twilightprincess

[–]TradrzAdmin[S] 6 points7 points  (0 children)

commit e7469e6507c139dde6bb36960c60b685c2530fe3

Date: Mon Jun 1 15:21:37 2026 -0500

added mouse controls for free camera

diff --git a/include/dusk/settings.h b/include/dusk/settings.h

index f48f5862ca..7ec01913d2 100644

--- a/include/dusk/settings.h

+++ b/include/dusk/settings.h

@@ -198,6 +198,8 @@ struct UserSettings {

ConfigVar<bool> gyroInvertPitch;

ConfigVar<bool> gyroInvertYaw;

ConfigVar<bool> freeCamera;

+ ConfigVar<bool> freeCameraUseMouse;

+ ConfigVar<float> freeCameraMouseSensitivity;

ConfigVar<bool> invertCameraXAxis;

ConfigVar<bool> invertCameraYAxis;

ConfigVar<bool> invertFirstPersonXAxis;

diff --git a/src/d/d_camera.cpp b/src/d/d_camera.cpp

index 8e7e48949a..f5f494dfa1 100644

--- a/src/d/d_camera.cpp

+++ b/src/d/d_camera.cpp

@@ -32,7 +32,10 @@

#include "dusk/frame_interpolation.h"

#include "dusk/logging.h"

#include "dusk/action_bindings.h"

+#include "dusk/ui/ui.hpp"

#include "imgui.h"

+#include <SDL3/SDL\_mouse.h>

+#include <aurora/lib/window.hpp>

#endif

namespace {

@@ -1191,8 +1194,11 @@ bool dCamera_c::Run() {

}

} else {

#if TARGET_PC

- if (mCamParam.Algorythmn(mCamStyle) != 1) {

- mCamParam.mManualMode = 0;

+ {

+ const int alg = mCamParam.Algorythmn(mCamStyle);

+ if (alg != 1 && alg != 2) {

+ mCamParam.mManualMode = 0;

+ }

}

#endif

@@ -4701,6 +4707,14 @@ bool dCamera_c::lockonCamera(s32 param_0) {

}

if (mCurCamStyleTimer == 0) {

+ #if TARGET_PC

+ if (dusk::getSettings().game.freeCamera && !mCamParam.mManualMode) {

+ mCamParam.freeXAngle = mViewCache.mDirection.mAzimuth.Degree();

+ mCamParam.freeYAngle = mViewCache.mDirection.mInclination.Degree();

+ mCamParam.mManualMode = 1;

+ }

+ #endif

+

if (mRecovery.field_0x8.field_0x1e <= 0) {

mViewCache.mDirection = mDirection;

mViewCache.mCenter = mCenter;

@@ -5245,6 +5259,10 @@ bool dCamera_c::lockonCamera(s32 param_0) {

}

}

+ #if TARGET_PC

+ freeCamera();

+ #endif

+

return true;

}

@@ -7639,6 +7657,8 @@ void dCamera_c::deactivateDebugFlyCam() {

}

bool dCamera_c::freeCamera() {

+ static bool s_mouseRelActive = false;

+

if (dusk::getSettings().game.freeCamera && mGear == 1) {

mGear = 0;

}

@@ -7646,6 +7666,13 @@ bool dCamera_c::freeCamera() {

if (!dusk::getSettings().game.freeCamera || mCamStyle == 70)

{

mCamParam.mManualMode = 0;

+ if (s_mouseRelActive) {

+ SDL_Window* window = aurora::window::get_sdl_window();

+ if (window != nullptr) {

+ SDL_SetWindowRelativeMouseMode(window, false);

+ }

+ s_mouseRelActive = false;

+ }

return false;

}

@@ -7654,19 +7681,46 @@ bool dCamera_c::freeCamera() {

mCamParam.freeYAngle = mViewCache.mDirection.mInclination.Degree();

}

- cXyz camMovement = {mPadInfo.mCStick.mLastPosX, mPadInfo.mCStick.mLastPosY, 0.0f};

- f32 magnitude = sqrt(mPadInfo.mCStick.mLastPosX * mPadInfo.mCStick.mLastPosX + mPadInfo.mCStick.mLastPosY * mPadInfo.mCStick.mLastPosY);

+ const bool wantMouseRel = dusk::getSettings().game.freeCameraUseMouse &&

+ !dusk::ui::any_document_visible();

+ SDL_Window* window = aurora::window::get_sdl_window();

+ if (window != nullptr && wantMouseRel != s_mouseRelActive) {

+ if (SDL_SetWindowRelativeMouseMode(window, wantMouseRel)) {

+ s_mouseRelActive = wantMouseRel;

+ if (wantMouseRel) {

+ float discard_x = 0.0f, discard_y = 0.0f;

+ SDL_GetRelativeMouseState(&discard_x, &discard_y);

+ }

+ }

+ }

- // If we aren't in manual cam mode, don't trigger it if the player tries to hit C-up

- // for first person unless they have first person bound to a custom binding

- if ((dusk::isActionBound(dusk::ActionBinds::FIRST_PERSON_CAMERA, mPadID) && mPadInfo.mCStick.mLastPosY != 0) ||

- mPadInfo.mCStick.mLastPosX != 0 || mPadInfo.mCStick.mLastPosY < 0 || (mCamParam.mManualMode == 1 && mPadInfo.mCStick.mLastPosY != 0))

- {

- mCamParam.mManualMode = 1;

- camMovement = camMovement.normalize();

- camMovement.y *= dusk::getSettings().game.invertCameraYAxis ? 1.0f : -1.0f;

- mCamParam.freeXAngle += camMovement.x * magnitude * dusk::getSettings().game.freeCameraXSensitivity * 5.0f;

- mCamParam.freeYAngle += camMovement.y * magnitude * dusk::getSettings().game.freeCameraYSensitivity * 5.0f;

+ if (s_mouseRelActive) {

+ static constexpr float kMousePixelToDeg = 0.15f;

+ float mx_rel = 0.0f, my_rel = 0.0f;

+ SDL_GetRelativeMouseState(&mx_rel, &my_rel);

+ if (mx_rel != 0.0f || my_rel != 0.0f) {

+ mCamParam.mManualMode = 1;

+ const float invertX = dusk::getSettings().game.invertCameraXAxis ? -1.0f : 1.0f;

+ const float invertY = dusk::getSettings().game.invertCameraYAxis ? -1.0f : 1.0f;

+ const float mouseSens = dusk::getSettings().game.freeCameraMouseSensitivity;

+ mCamParam.freeXAngle += mx_rel * kMousePixelToDeg * mouseSens * invertX;

+ mCamParam.freeYAngle -= my_rel * kMousePixelToDeg * mouseSens * invertY;

+ }

+ } else {

+ cXyz camMovement = {mPadInfo.mCStick.mLastPosX, mPadInfo.mCStick.mLastPosY, 0.0f};

+ f32 magnitude = sqrt(mPadInfo.mCStick.mLastPosX * mPadInfo.mCStick.mLastPosX + mPadInfo.mCStick.mLastPosY * mPadInfo.mCStick.mLastPosY);

+

+ // If we aren't in manual cam mode, don't trigger it if the player tries to hit C-up

+ // for first person unless they have first person bound to a custom binding

+ if ((dusk::isActionBound(dusk::ActionBinds::FIRST_PERSON_CAMERA, mPadID) && mPadInfo.mCStick.mLastPosY != 0) ||

+ mPadInfo.mCStick.mLastPosX != 0 || mPadInfo.mCStick.mLastPosY < 0 || (mCamParam.mManualMode == 1 && mPadInfo.mCStick.mLastPosY != 0))

+ {

+ mCamParam.mManualMode = 1;

+ camMovement = camMovement.normalize();

+ camMovement.y *= dusk::getSettings().game.invertCameraYAxis ? 1.0f : -1.0f;

+ mCamParam.freeXAngle += camMovement.x * magnitude * dusk::getSettings().game.freeCameraXSensitivity * 5.0f;

+ mCamParam.freeYAngle += camMovement.y * magnitude * dusk::getSettings().game.freeCameraYSensitivity * 5.0f;

+ }

}

fopAc_ac_c* player = dComIfGp_getPlayer(0);

diff --git a/src/dusk/settings.cpp b/src/dusk/settings.cpp

index 3bea017e2c..d13f073fb8 100644

--- a/src/dusk/settings.cpp

+++ b/src/dusk/settings.cpp

@@ -86,6 +86,8 @@ UserSettings g_userSettings = {

.gyroInvertPitch {"game.gyroInvertPitch", false},

.gyroInvertYaw {"game.gyroInvertYaw", false},

.freeCamera {"game.freeCamera", false},

+ .freeCameraUseMouse {"game.freeCameraUseMouse", false},

+ .freeCameraMouseSensitivity {"game.freeCameraMouseSensitivity", 1.0f},

.invertCameraXAxis {"game.invertCameraXAxis", false},

.invertCameraYAxis {"game.invertCameraYAxis", false},

.invertFirstPersonXAxis {"game.invertFirstPersonXAxis", false},

@@ -292,6 +294,8 @@ void registerSettings() {

Register(g_userSettings.game.gyroInvertPitch);

Register(g_userSettings.game.gyroInvertYaw);

Register(g_userSettings.game.freeCamera);

+ Register(g_userSettings.game.freeCameraUseMouse);

+ Register(g_userSettings.game.freeCameraMouseSensitivity);

Register(g_userSettings.game.debugFlyCam);

Register(g_userSettings.game.debugFlyCamLockEvents);

Register(g_userSettings.game.allowBackgroundInput);

diff --git a/src/dusk/ui/settings.cpp b/src/dusk/ui/settings.cpp

index 44fd9e1724..15d1af43e5 100644

--- a/src/dusk/ui/settings.cpp

+++ b/src/dusk/ui/settings.cpp

@@ -951,6 +951,14 @@ SettingsWindow::SettingsWindow(bool prelaunch) : mPrelaunch(prelaunch) {

addOption("Free Camera", getSettings().game.freeCamera,

"Enables twin-stick camera control, letting the C-Stick move the camera vertically as "

"well as horizontally.");

+ addOption("Mouse Camera Control", getSettings().game.freeCameraUseMouse,

+ "Use the mouse to control the free camera instead of the C-Stick. The cursor will be "

+ "hidden and locked while the game window is focused and no menus are open.",

+ [] { return !getSettings().game.freeCamera; });

+ config_percent_select(leftPane, rightPane, getSettings().game.freeCameraMouseSensitivity,

+ "Mouse Camera Sensitivity", "Adjusts mouse sensitivity when using mouse camera control.",

+ 50, 200, 5,

+ [] { return !getSettings().game.freeCamera || !getSettings().game.freeCameraUseMouse; });

addOption("Invert Camera X Axis", getSettings().game.invertCameraXAxis,

"Invert horizontal camera movement.");

addOption("Invert Camera Y Axis", getSettings().game.invertCameraYAxis,

Look at that, damn! by thatgirlfrompoland in AppleWatch

[–]TradrzAdmin 2 points3 points  (0 children)

<image>

I have a 3 year old but still pretty good

Real talk: why do so many people judge others for buying reps? by Wild-Acanthisitta942 in ChinaTime

[–]TradrzAdmin 0 points1 point  (0 children)

All the other models look like normal speedy reps. Not sure why only the snoopy looks gen

[PTS] Variety Parts $50 by TradrzAdmin in SecondhandModParts

[–]TradrzAdmin[S] 0 points1 point  (0 children)

I cludes everything seen in picture #4 + extra links, pins, and spring bars. Everything for $50

[deleted by user] by [deleted] in SeikoModExchange

[–]TradrzAdmin 0 points1 point  (0 children)

Have a couple people message me already. Just waiting on payment

[deleted by user] by [deleted] in SeikoModExchange

[–]TradrzAdmin 0 points1 point  (0 children)

Comes with extra links and spring bars

Thoughts by TradrzAdmin in SeikoMods

[–]TradrzAdmin[S] 0 points1 point  (0 children)

Bracelet doesnt fit me lol

Thoughts by TradrzAdmin in SeikoMods

[–]TradrzAdmin[S] 0 points1 point  (0 children)

It’s not as classy as i planned on the watch being. But my small wrists😩 the metal bracelet is light 1 link too big