You can change the gizmo transform space using the following function call:
RTObjectSelectionGizmos.Get.SetTransformSpace(GizmoSpace.Local);
RTObjectSelectionGizmos.Get.SetTransformSpace(GizmoSpace.Global);
This function call will affect the following gizmos:
- MoveGizmo;
- RotationGizmo;
- UniversalGizmo;
- ExtrudeGizmo;
Note: The scale gizmo and box scale gizmos will always use the Local transform space.
If you wish to modify the transform space for a specific gizmo, then you need to first retreive a reference to the gizmo and then change it's transform space.
// Change the move gizmo transform space to Local
var gizmo = RTObjectSelectionGizmos.Get.GetGizmoById(ObjectSelectionGizmoId.MoveGizmo);
gizmo.ObjectTransformGizmo.SetTransformSpace(GizmoSpace.Local);
// Change the rotation gizmo transform space to Global
var gizmo = RTObjectSelectionGizmos.Get.GetGizmoById(ObjectSelectionGizmoId.RotationGizmo);
gizmo.ObjectTransformGizmo.SetTransformSpace(GizmoSpace.Global);
// Change the universal gizmo transform space to Global
var gizmo = RTObjectSelectionGizmos.Get.GetGizmoById(ObjectSelectionGizmoId.UniversalGizmo);
gizmo.ObjectTransformGizmo.SetTransformSpace(GizmoSpace.Global);
// Change the extrude gizmo extrude space to Local
// Note: In this case the SetExtrudeSpace function is used which belongs to the
// ObjectExtrudeGizmo behaviour.
var gizmo = RTObjectSelectionGizmos.Get.GetGizmoById(ObjectSelectionGizmoId.ExtrudeGizmo);
gizmo.ObjectExtrudeGizmo.SetExtrudeSpace(GizmoSpace.Local);