Guide

Summary

A guide widget

Instance Properties

NameReturn TypeDescription

index

number Read-only

The index of the active widget

layer

Layer Read/Write

The layer the guide is on

group

Group Read/Write

The group this guide is part of

transform

Transform Read/Write

The transform of the Guide Widget

position

Vector3 Read/Write

The 3D position of the Guide Widget

rotation

Rotation Read/Write

The 3D orientation of the Guide Widget

scale

number Read/Write

The scale of the Guide Widget

Class Methods

Guide:NewCube(transform)

Creates a new cube guide with a default size using the transform for position and orientation

Returns: Guide (A new cube guide)

Parameters:

NameTypeDefaultDescription

transform

The transform of the Guide Widget

Example

myGuide = Guide:NewCube(Transform:New(0, 5, 2)

Guide:NewSphere(transform)

Creates a new sphere guide with a default size using the transform for position and orientation

Returns: Guide (A new sphere guide)

Parameters:

NameTypeDefaultDescription

transform

The transform of the Guide Widget

Example

myGuide = Guide:NewSphere(Transform:New(0, 5, 2)

Guide:NewCapsule(transform)

Creates a new capsule guide with a default size using the transform for position and orientation

Returns: Guide (A new capsule guide)

Parameters:

NameTypeDefaultDescription

transform

The transform of the Guide Widget

Example

myGuide = Guide:NewCapsule(Transform:New(0, 5, 2)

Guide:NewCone(transform)

Creates a new cone guide with a default size using the transform for position and orientation

Returns: Guide (A new cone guide)

Parameters:

NameTypeDefaultDescription

transform

The transform of the Guide Widget

Example

myGuide = Guide:NewCone(Transform:New(0, 5, 2)

Guide:NewEllipsoid(transform)

Creates a new ellipsoid guide with a default size using the transform for position and orientation

Returns: Guide (A new ellipsoid guide)

Parameters:

NameTypeDefaultDescription

transform

The transform of the Guide Widget

Example

myGuide = Guide:NewEllipsoid(Transform:New(0, 5, 2)

Guide:NewCustom(transform, model)

Creates a new custom guide from a 3d model. Note that custom guides have to be convex so your model will be "wrapped" as a convex hull

Returns: Guide (A new custom guide based on the convex hull of the model)

Parameters:

NameTypeDefaultDescription

transform

The transform of the Guide Widget

model

The Model to use for the custom guide

Example

myGuide = Guide:NewCustom(Transform:New(0, 5, 2), myModel

Instance Methods

guide:Select()

Adds the guide to the current selection

Returns: nil

Example

myGuide:Select()

guide:Deselect()

Removes the guide from the current selection

Returns: nil

Example

myGuide:Deselect()

guide:Delete()

Deletes the guide

Returns: nil

Example

myGuide:Delete()

guide:Scale(scale)

Scales the guide (scale can be non-uniform as some guide types can be stretched)

Returns: nil

Parameters:

NameTypeDefaultDescription

scale

The scale vector for scaling the Guide Widget

Example

myGuide:Scale(Vector3:New(2, 0, 0)

Last updated