Crate egui_gizmo

source ·
Expand description

Provides a 3d transformation gizmo that can be used to manipulate 4x4 transformation matrices. Such gizmos are commonly used in applications such as game engines and 3d modeling software.

Creating a gizmo

For a more complete example, see the online demo at The demo sources can be found at

A basic example

let gizmo = Gizmo::new("My gizmo")

if let Some(response) = gizmo.interact(ui) {
    model_matrix = response.transform.into();

The gizmo can be placed inside a container such as a egui::Window or an egui::Area. By default, the gizmo will use the ui clip rect as a viewport. The gizmo will apply transformations to the given model matrix. Result of the gizmo interaction includes the transformed 4x4 model matrix as a 2-dimensional array.


Result of an active transformation
Controls the visual style of the gizmo



The default snapping distance for rotation in radians
The default snapping distance for translation
The default snapping distance for scale