bevyengine / bevyengine/bevy

[0.19.0-rc.2] Translate and rotate gizmo snap should allow to be relative to their starting point, or allow a custom offset/origin

Open
#24,430 2 comments 0 reactions 0 assignees View on GitHub
A-Editor A-Gizmos C-Feature S-Needs-Design
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 16h
Merged PRs (30d)
171

Description

## What problem does this solve or what need does it fill?

Currently, snapping only supports snapping to world/global rotations, and thus breaks local space rotations (see #24431) and prevents relative adjustments. It would be useful to have other transform modes respect global/local selections when snapping.

## What solution would you like?

Either an option to set a custom origin/transform to operate relative to in `TransformGizmoState`, or maybe when in local mode, transformation should allow snapping to respect the local space transform at the start of the operation as a setting in `TransformGizmoSettings`.

## What alternative(s) have you considered?

Both mentioned in solution

## Additional context

Standard snapping behaviour in many engines and editors when doing local transformations, especially rotations (local rotations should not be snapping to world axis, local translation should not be snapping to world axis, should allow snapping to be offset-based instead of just world-space as many editors implement it this way)

Contributor guide

Open the contributing guide

Research direction

Start by tracing TransformGizmoState and TransformGizmoSettings, then read the related local-space rotation problem in #24431 and follow the existing snapping behavior. Done means a selected approach supports local-space snapping and relative or custom-origin adjustments while preserving global-space behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
game-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.