Gizmoclass
Methods18
Showing 18 methods
public static void EndInstance(Sandbox.Gizmo.Instance previous)
| Parameter | Type | Description |
|---|---|---|
| previous | Instance | — |
void—public static Vector3 GetMouseDelta(Vector3 position, Vector3 planeNormal)
Get the mouse delta at this current position
| Parameter | Type | Description |
|---|---|---|
| position | Vector3 | — |
| planeNormal | Vector3 | — |
public static float GetMouseDistance(Vector3 position, Vector3 planeNormal)
Get the distance from a point on a plane
| Parameter | Type | Description |
|---|---|---|
| position | Vector3 | — |
| planeNormal | Vector3 | — |
float—public static float GetMouseDistanceDelta(Vector3 position, Vector3 planeNormal)
Get the distance moved from (or towards) a position on a plane
| Parameter | Type | Description |
|---|---|---|
| position | Vector3 | — |
| planeNormal | Vector3 | — |
float—public static Vector3 GetMouseDistanceVector(Vector3 position, Vector3 planeNormal)
Get the vector distance from a point on a plane
| Parameter | Type | Description |
|---|---|---|
| position | Vector3 | — |
| planeNormal | Vector3 | — |
public static Vector3 GetMouseDrag(Vector3 position, Vector3 planeNormal)
Get the mouse drag distance at this current position, assuming we are pressed
| Parameter | Type | Description |
|---|---|---|
| position | Vector3 | — |
| planeNormal | Vector3 | — |
public static System.Nullable`1<Vector3> GetPositionOnPlane(Vector3 position, Vector3 planeNormal, Ray ray)
Get the distance from a point on a plane
| Parameter | Type | Description |
|---|---|---|
| position | Vector3 | — |
| planeNormal | Vector3 | — |
| ray | Ray | — |
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
| Parameter | Type | Description |
|---|---|---|
| rotation | Rotation | — |
| direction | Vector2 | — |
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.
| Parameter | Type | Description |
|---|---|---|
| obj | T | — |
| tx | Transform | — |
IDisposable—public static void Select(bool allowUnselect = True, bool allowMultiSelect = True)
| Parameter | Type | Description |
|---|---|---|
| allowUnselect = True | bool | — |
| allowMultiSelect = True | bool | — |
void—No results match this filter.
Properties40
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; }
string—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; }
bool—public static bool Sandbox.Gizmo.HasHovered { get; set; }
bool—public static bool Sandbox.Gizmo.HasMouseFocus { get; set; }
bool—public static bool Sandbox.Gizmo.HasPressed { get; set; }
Obsolete: Use Gizmo.Pressed.Any
bool—public static bool Sandbox.Gizmo.HasSelected { get; set; }
bool—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; }
bool—public static bool Sandbox.Gizmo.IsChildSelected { get; set; }
bool—public static bool Sandbox.Gizmo.IsCtrlPressed { get; set; }
bool—public static bool Sandbox.Gizmo.IsDoubleClicked { get; set; }
bool—public static bool Sandbox.Gizmo.IsHovered { get; set; }
bool—public static bool Sandbox.Gizmo.IsLeftMouseDown { get; set; }
bool—public static bool Sandbox.Gizmo.IsPressed { get; set; }
Obsolete: Use Gizmo.Pressed.This
bool—public static bool Sandbox.Gizmo.IsRightMouseDown { get; set; }
bool—public static bool Sandbox.Gizmo.IsSelected { get; set; }
bool—public static bool Sandbox.Gizmo.IsShiftPressed { get; set; }
bool—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; }
object—public static string Sandbox.Gizmo.Path { get; set; }
string—public static float Sandbox.Gizmo.RayDepth { get; set; }
float—public static Sandbox.Gizmo.SceneSettings Sandbox.Gizmo.Settings { get; set; }
public static bool Sandbox.Gizmo.WasClicked { get; set; }
bool—public static bool Sandbox.Gizmo.WasLeftMousePressed { get; set; }
bool—public static bool Sandbox.Gizmo.WasLeftMouseReleased { get; set; }
bool—public static bool Sandbox.Gizmo.WasRightMousePressed { get; set; }
bool—public static bool Sandbox.Gizmo.WasRightMouseReleased { get; set; }
bool—public static Sandbox.SceneWorld Sandbox.Gizmo.World { get; set; }
No results match this filter.