-
Notifications
You must be signed in to change notification settings - Fork 105
Updated gizmos for translate/rotate/scale #1367
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
Conversation
…ations for 'pc' and 'pcx' in types.d.ts
|
This is a significant one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I literally cannot believe how simple this PR is. Engine Gizmo system FTW! 🚀
|
@Maksims thanks for your in-depth here are my thoughts on your comments: ColorsThese were designed with customization in mind (including the hover colors) so can be adjusted accordingly to match (if so required). This idea was to allow the user to customize their gizmos in the editor however they would like Axis/plane flippingThis was a recent addition for better accessibility when using the gizmos from obscure angles. Again like the colors this was planned to be added as a user customization feature in the future Translating in facing planeThis is a regression and will be fixed Consistent scalingThis is a feature I had missing I will add this (it is present in superspl.at) GuidesActually yes I agree with this - the hover should show the plane but actually movement its better to have all 3. As for the occlusion I had missed this actually and will add HidingThis was disabled but I will add a setting to reduce opacity when moving for a clearer view BugsFor the sticky mouse issue is this when the mouse leaves the viewport? Which scenarios does this occur in? as for the entity name on hover I will fix this |
|
To reduce the issue of imposed changes on users. It will be the best to match the behavior and look as much as possible by default. As it will reduce the mechanical-memory confusions by users in case of different behavior / perception. And then add settings to customize.
Is it possible to match existing colors by default, and then provide customization by users that need it?
Can this be disabled by default (not flipping axes by default), and provide a setting in the future for users if they want it?
Can this be enabled by default (gizmos hiding), and then provide a setting later to configure if someone needs it?
This actually same for existing gizmos - if you alt+tab to other window and release mouse over other window. Or on Windows do a screenshot with a snippet which has overlay over your screen - it will lead to sticky one. |
|
I checked it and think that the old visuals and behavior were better and the new one should match it and add the extra options as configurable in the settings like Max said. |
|
@SaadHaider7 OK, but do you have anything specific you would like to add to @kpal81xd's list above? |
|
The Rotation gizmo, if that can be improved and is less flickery, bandicam.2025-08-07.20-26-12-910.mp4 |
I figured out what you meant by moving the gizmo to infinity from a sharp angle. I just keep the gizmo position fixed once the intersection test (close to infinity) and seems to work nicely |
|
The other issue, is with use of more complex hierarchy, non uniform scales and parent rotations. 2025-09-03.18-47-18.mp4With rotation gizmos, their axes are especially missaligned: 2025-09-03.18-52-24.mp4 |
Critical!!If parent has rotation, then selecting any descendant, local gizmo will be not properly transformed. 2025-09-03.18-57-07.mp4 |
|
Is it possible to make a new gizmo look somewhat closer to existing ones (esp. the rectangle bit on translate)? So they don't look that "flat"? |
So here is what I have fixed
Regarding the flatness I had made the gizmo opacity less so you can see the planes clearer however it was noted that the gizmos look less "vibrant". I can add further customisation to the gizmo theme in the future for separating all shapes however this is adequate for now. |
…th a single event emission
…te permission check
…selection changes
…wport render on updates
* Updated gizmos for translate/rotate/scale (#1367) * Update PlayCanvas dependency to version 2.10.3 and refine type declarations for 'pc' and 'pcx' in types.d.ts * feat: replaced translate gizmo with engine one * refactor: simplify layer creation and entity attachment in translate gizmo * feat: added history management to gizmo * fix: preserve history state in setTRS function * fix: update history management in gizmo-translate to use cache instead of store * fix: rename state variable to action for clarity in history management * fix: update action structure for history management in gizmo-translate * feat: replaced old gizmos with new scale and rotate gizmos * feat: combined all transform gizmos into one class * fix: allow for switching cameras for gizmos * fix: add write permission check to gizmo update logic * feat: add snapping functionality to gizmos with configurable increment * feat: add custom theme to gizmos to match the look of existing ones * feat: set gizmo opacity to 0.7 * feat: update gizmo theme structure and add guideOccluded color settings * feat: add xyz color settings for guideOccluded in gizmo initialization * feat: update guideOccluded settings to guideOcclusion for improved clarity * feat: simplify color settings in initGizmo by removing opacity and enabling orbit rotation for RotateGizmo * feat: override picker to reset node and picked if gizmo is being hovered * feat: update initGizmo to disable axis shapes for improved scaling intuitiveness * feat: set dragMode to 'hide' for RotateGizmo in initGizmo for improved user experience * feat: toggle camera and viewport pick state during gizmo initialization * fix: update drag mode for RotateGizmo to 'selected' * feat: add angle guide thickness to gizmo initialization * fix: rename parameter in gizmo:coordSystem event for clarity * fix: update gizmo initialization to hide center sphere and rotation ball * fix: update playcanvas version to 2.11.1 and adjust Node.js engine requirement * fix: update playcanvas version to 2.11.2 * fix: unify gizmo visibility handling by replacing individual calls with a single event emission * fix: improve visibility handling in update function by separating write permission check * fix: refactor gizmo update handling to use reflow for visibility and selection changes * fix: update gizmo enable logic to depend on write state and visibility * fix: update gizmo visibility handling by emitting events on handle changes * fix: update gizmo event handling to track hover state and trigger viewport render on updates * fix: integrate FORCE_PICK_TAG into gizmo entity creation and viewport picking logic * chore: update playcanvas dependency to version 2.11.3 * fix: properly destroy gizmos on scene unload * feat: add customizable gizmo settings for size, preset, and rotation mode * feat: add gizmo size and preset settings to the editor * fix: update gizmo preset description for clarity * fix: restore classic option in gizmo settings * chore: update playcanvas dependency to version 2.11.4 * feat: enable uniform scaling for scale gizmo * feat: matched existing style for transform and scale gizmos * fix: update playcanvas dependency to version 2.11.6 * fix: update playcanvas dependency to version 2.11.6 * feat: updated gizmo settings from projectUser to user * feat: added gizmo carrying while moving * refactor: update gizmo event handling for improved hover state tracking * feat: emit hover state event when detaching gizmo transforms * feat: handle hover state when detaching gizmo nodes * feat: allow rotation while holding gizmo













Requires
Checklist