Skip to content

Add camera reset functionality (R key) and fix build#110

Merged
TECHNICANGEL merged 2 commits intomasterfrom
palette-camera-reset-5182742576547245750
Feb 23, 2026
Merged

Add camera reset functionality (R key) and fix build#110
TECHNICANGEL merged 2 commits intomasterfrom
palette-camera-reset-5182742576547245750

Conversation

@TECHNICANGEL
Copy link
Owner

This PR implements a "Reset Camera" feature (requested as a micro-UX improvement).

Changes:

  1. Fixed Compilation Error: Removed duplicate declarations of currentFPS and frameTimeMs in src/main.cpp which were preventing the project from building.
  2. Camera Class Update: Added initialPosition, initialYaw, initialPitch, and initialFov members to Camera.h and initialized them in the constructor. Added a reset() method to restore these values.
  3. Input Handling: Updated keyCallback in src/main.cpp to listen for the 'R' key.
  4. UX Feedback: When 'R' is pressed, the camera resets, a log message is printed, and the window title (status bar) is updated immediately to reflect the new position.

This change allows users to easily recover from disorientation while navigating the 3D scene.


PR created automatically by Jules for task 5182742576547245750 started by @TECHNICANGEL

- Fix: Remove redundant declaration of `currentFPS` and `frameTimeMs` in `src/main.cpp` that caused compilation errors.
- Feature: Add `reset()` method to `Camera` class to restore initial position and orientation.
- UX: Bind 'R' key to camera reset in `src/main.cpp`.
- UX: Provide immediate feedback via window title update and log message on reset.

Co-authored-by: TECHNICANGEL <197574689+TECHNICANGEL@users.noreply.github.com>
@google-labs-jules
Copy link

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@TECHNICANGEL TECHNICANGEL merged commit f8e59f9 into master Feb 23, 2026
1 check passed
@TECHNICANGEL TECHNICANGEL deleted the palette-camera-reset-5182742576547245750 branch February 23, 2026 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant