Skip to content

Created Drag Mode (previously god mode) #1145

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 12 commits into
base: dev
Choose a base branch
from

Conversation

ariesninjadev
Copy link

Added a drag mode system that allows users to move and manipulate all dynamic objects including robots and game pieces. The system intercepts mouse interactions and moves bodies via force-based dragging. The system automatically detects draggable objects and excludes static bodies and field structures, with special handling for complex objects like robots by temporarily disabling their physics during drag operations. The drag also includes velocity damping, distance-based speed control, and mass-proportional force application. A visual drag mode indicator appears when drag mode is active and camera controls are automatically disabled during drag operations. The functionality is accessible through the debug panel with toggle controls and toast notifications for mode status changes. These changes collectively represent the deprecation of "God Mode" and replaces it with "Drag Mode".

image image

(Difficult to demonstrate actual behavior through screenshots)

@ariesninjadev ariesninjadev requested review from HunterBarclay and a team as code owners June 19, 2025 18:24
@ariesninjadev ariesninjadev changed the base branch from prod to dev June 19, 2025 18:25
@ariesninjadev ariesninjadev requested a review from a team as a code owner June 19, 2025 18:25
@BrandonPacewic BrandonPacewic added enhancement gameplay Relating to the playability of Synthesis and removed enhancement labels Jun 19, 2025
Copy link
Member

@rutmanz rutmanz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you're going to have a button-shaped indicator that says "drag mode" it would make sense to have it be a button to deactivate drag mode (or look less like a button). It also is covered by the fps indicator, the bottom left might be a better place for it

Copy link
Member

@PepperLola PepperLola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be nice if whichever element you're dragging stayed fixed to the mouse cursor, since right now it drifts the farther you drag it.

Copy link
Member

@BrandonPacewic BrandonPacewic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran into this, not 100% sure if this is intended or not. Happens on trackpad.

Screen.Recording.2025-06-20.at.15.00.22.mov

@ariesninjadev
Copy link
Author

Ran into this, not 100% sure if this is intended or not. Happens on trackpad.

Screen.Recording.2025-06-20.at.15.00.22.mov

@BrandonPacewic I partially fixed the issue here, where now game pieces are actually draggable but they jitter a lot when dragged. I believe that this bug is beyond the scope of my PR but feel free to take a look and see if this jitter might be caused by an oversight in my code.

Copy link
Member

@PepperLola PepperLola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It still doesn't look like the robot is fixed to the cursor, since it's possible to move the cursor off of the robot while in drag mode.

Screen.Recording.2025-06-20.at.5.39.16.PM.mov

I also don't think this was part of the task, but in previous versions you were able to use the scroll wheel to move whatever you're holding towards and away from the camera which is nice for accurately placing something.

@ariesninjadev ariesninjadev requested a review from PepperLola June 24, 2025 16:37
Copy link
Member

@BrandonPacewic BrandonPacewic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code here is quite interesting, seems to work well. Nice job :godmode:

I also believe that @PepperLola's problems have been properly addressed.

@BrandonPacewic BrandonPacewic dismissed PepperLola’s stale review June 24, 2025 23:35

Requested changes implemented.

Copy link
Member

@PepperLola PepperLola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

snazzy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gameplay Relating to the playability of Synthesis
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants