public static abstract sealed class Sandbox.Gizmo
Related Guides
Broader workflow and conceptual references connected to this API.
You can create your own editor tool to help you create your game. Your tool needs to be created in an editor project.
The scope based system works by creating a snapshot of a change set when the scope is entered and another one when the scope is disposed of. The system will automatically take care of restoring the state on undo/redo.
Methods
Showing 18 methods
public static void EndInstance(Sandbox.Gizmo.Instance previous)
public static Vector3 GetMouseDelta(Vector3 position, Vector3 planeNormal)
Get the mouse delta at this current position
public static float GetMouseDistance(Vector3 position, Vector3 planeNormal)
Get the distance from a point on a plane
public static float GetMouseDistanceDelta(Vector3 position, Vector3 planeNormal)
Get the distance moved from (or towards) a position on a plane
public static Vector3 GetMouseDistanceVector(Vector3 position, Vector3 planeNormal)
Get the vector distance from a point on a plane
public static Vector3 GetMouseDrag(Vector3 position, Vector3 planeNormal)
Get the mouse drag distance at this current position, assuming we are pressed
public static System.Nullable`1<Vector3> GetPositionOnPlane(Vector3 position, Vector3 planeNormal, Ray ray)
Get the distance from a point on a plane
public static Vector3 Nudge(Rotation rotation, Vector2 direction)
Will give you a nudge vector along the most aligned left and up axis of the rotation based on left/right/up/down direction and camera angle
public static System.IDisposable ObjectScope(T obj, Transform tx)
Create a new scope - any changes to colors and transforms will be stored and reverted when exiting the scope.
public static void Select(bool allowUnselect = True, bool allowMultiSelect = True)
Parameters
allowUnselect: Default: TrueallowMultiSelect: Default: True
No results match this filter.
Properties
Showing 40 properties
public static Sandbox.SceneCamera Sandbox.Gizmo.Camera { get; set; }
public static Transform Sandbox.Gizmo.CameraTransform { get; set; }
The cameras transform - in world space
public static Sandbox.Gizmo.GizmoControls Sandbox.Gizmo.Control { get; set; }
Holds fully realized controls to manipulate some value
public static string Sandbox.Gizmo.ControlMode { get; set; }
public static Vector2 Sandbox.Gizmo.CursorDragDelta { get; set; }
The delta of cursor movement between last press and now, in screen space. If left mouse isn't down, will return CursorMoveDelta
public static Vector2 Sandbox.Gizmo.CursorMoveDelta { get; set; }
The delta of cursor movement between this frame and last, in screen space
public static Vector2 Sandbox.Gizmo.CursorPosition { get; set; }
The current cursor position, in screen space
public static Sandbox.Gizmo.GizmoDraw Sandbox.Gizmo.Draw { get; set; }
Draw a shape using the gizmo library
public static bool Sandbox.Gizmo.HasClicked { get; set; }
public static bool Sandbox.Gizmo.HasHovered { get; set; }
public static bool Sandbox.Gizmo.HasMouseFocus { get; set; }
public static bool Sandbox.Gizmo.HasPressed { get; set; }Obsolete
Obsolete: Use Gizmo.Pressed.Any
public static bool Sandbox.Gizmo.HasSelected { get; set; }
public static Sandbox.Gizmo.GizmoHitbox Sandbox.Gizmo.Hitbox { get; set; }
Allows creating a gizmo hitbox which will be interactable using the mouse (or vr deck2 super controller)
public static bool Sandbox.Gizmo.IsAltPressed { get; set; }
public static bool Sandbox.Gizmo.IsChildSelected { get; set; }
public static bool Sandbox.Gizmo.IsCtrlPressed { get; set; }
public static bool Sandbox.Gizmo.IsDoubleClicked { get; set; }
public static bool Sandbox.Gizmo.IsHovered { get; set; }
public static bool Sandbox.Gizmo.IsLeftMouseDown { get; set; }
public static bool Sandbox.Gizmo.IsPressed { get; set; }Obsolete
Obsolete: Use Gizmo.Pressed.This
public static bool Sandbox.Gizmo.IsRightMouseDown { get; set; }
public static bool Sandbox.Gizmo.IsSelected { get; set; }
public static bool Sandbox.Gizmo.IsShiftPressed { get; set; }
public static Sandbox.KeyboardModifiers Sandbox.Gizmo.KeyboardModifiers { get; set; }
The current keyboard modifiers
public static Transform Sandbox.Gizmo.LocalCameraTransform { get; set; }
The cameras transform - in local space
public static object Sandbox.Gizmo.Object { get; set; }
public static string Sandbox.Gizmo.Path { get; set; }
public static float Sandbox.Gizmo.RayDepth { get; set; }
public static Sandbox.Gizmo.SceneSettings Sandbox.Gizmo.Settings { get; set; }
public static bool Sandbox.Gizmo.WasClicked { get; set; }
public static bool Sandbox.Gizmo.WasLeftMousePressed { get; set; }
public static bool Sandbox.Gizmo.WasLeftMouseReleased { get; set; }
public static bool Sandbox.Gizmo.WasRightMousePressed { get; set; }
public static bool Sandbox.Gizmo.WasRightMouseReleased { get; set; }
public static Sandbox.SceneWorld Sandbox.Gizmo.World { get; set; }
No results match this filter.
Metadata
| Field | Value |
|---|---|
| Namespace | Sandbox |
| Type | class |
| Assembly | Sandbox.Engine |
| Doc ID | T:Sandbox.Gizmo |