s&box docs

public sealed class Sandbox.Gizmo.GizmoControls

Extendable helper to create common gizmos

Methods

Showing 14 methods

public bool Arrow(string name, Vector3 axis, float distance, float length = 24, float girth = 6, float axisOffset = 2, float cullAngle = 10, float snapSize = 0, string head = cone)

Draw an arrow - return move delta if interacted with

Parameters

  • length: Default: 24
  • girth: Default: 6
  • axisOffset: Default: 2
  • cullAngle: Default: 10
  • snapSize: Default: 0
  • head: Default: cone

public bool DragSquare(string name, Vector2 size, Rotation rotation, Vector3 movement, System.Action drawHandle = null)

Manipulate a 2d value by moving on 2 axis

Parameters

  • drawHandle: Default: null

public bool Position(string name, Vector3 position, Vector3 newPos, System.Nullable`1<Rotation> axisRotation = null, float squareSize = 3)

Parameters

  • axisRotation: Default: null
  • squareSize: Default: 3

public static System.IDisposable PushFixedScale(System.Nullable`1<float> scale = null)

Parameters

  • scale: Default: null

public bool RotateSingle(string name, Color color, float angleDelta, float size = 19, bool useHalfCircle = True)

A single rotation axis

Parameters

  • size: Default: 19
  • useHalfCircle: Default: True

public bool Sphere(string name, float radius, float outRadius, Color color)

A scalable sphere gizmo. Returns true if the gizmo was interacted with and outValue will return the new radius.

Metadata

FieldValue
Namespaceglobal
Typeclass
AssemblySandbox.Engine
Doc IDT:Sandbox.Gizmo.GizmoControls

On this page

Methodspublic System.Boolean Arrow(System.String name, Vector3 axis, System.Single distance, System.Single length = 24, System.Single girth = 6, System.Single axisOffset = 2, System.Single cullAngle = 10, System.Single snapSize = 0, System.String head = cone)public System.Boolean BoundingBox(System.String name, BBox value, BBox outValue, System.Boolean outPressed, System.Boolean allowPlanarResize)public System.Boolean BoundingBox(System.String name, BBox value, BBox outValue)public System.Boolean Capsule(System.String name, Capsule capsule, Capsule outCapsule, Color color)public System.Boolean DragBox(System.String name, Vector3 size, Rotation rotation, Vector3 movement)public System.Boolean DragSquare(System.String name, Vector2 size, Rotation rotation, Vector3 movement, System.Action drawHandle = null)public System.Boolean Position(System.String name, Vector3 position, Vector3 newPos, System.Nullable`1<Rotation> axisRotation = null, System.Single squareSize = 3)public static System.IDisposable PushFixedScale(System.Nullable`1<System.Single> scale = null)public System.Boolean Rotate(System.String name, Angles outValue)public System.Boolean Rotate(System.String name, Rotation value, Rotation newValue)public System.Boolean RotateSingle(System.String name, Color color, System.Single angleDelta, System.Single size = 19, System.Boolean useHalfCircle = True)public System.Boolean Scale(System.String name, System.Single value, System.Single outValue)public System.Boolean Scale(System.String name, Vector3 value, Vector3 outValue, System.Nullable`1<Rotation> axisRotation = null, System.Single squareSize = 3)public System.Boolean Sphere(System.String name, System.Single radius, System.Single outRadius, Color color)Metadata