DynamicInstance
Inherits from Instance
DynamicInstance is the base class where all objects with a position, rotation and scale derive from.
Summary
Properties
Forward:Vector3LocalPosition:Vector3 = Vector3.NewLocalRotation:Vector3 = Vector3.NewLocalSize:Vector3 = Vector3.NewPosition:Vector3 = Vector3.NewRight:Vector3Rotation:Vector3 = Vector3.NewSize:Vector3 = Vector3.NewUp:Vector3Quaternion:QuaternionLocalQuaternion:Quaternion
Methods
LookAt:voidLookAt:voidLookAt:voidTranslate:voidRotateAround:voidRotate:voidInverseTransformPoint:Vector3TransformPoint:Vector3InverseTransformDirection:Vector3TransformDirection:Vector3InverseTransformVector:Vector3InverseTransformPosition:Vector3
Properties
Forward
DynamicInstance.Forward: Vector3
The forward vector of this DynamicInstance
LocalPosition
DynamicInstance.LocalPosition: Vector3 = Vector3.New
Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
0 | any | - | |
10 | any | - | |
0 | any | - |
Specifies the position relative to the parent of an instance.
LocalRotation
DynamicInstance.LocalRotation: Vector3 = Vector3.New
Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
0 | any | - | |
45 | any | - | |
0 | any | - |
Specifies the rotation relative to the parent of an instance.
LocalSize
DynamicInstance.LocalSize: Vector3 = Vector3.New
Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
1 | any | - | |
1 | any | - | |
1 | any | - |
The size of the instance relative to its parent.
Position
DynamicInstance.Position: Vector3 = Vector3.New
Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
0 | any | - | |
10 | any | - | |
0 | any | - |
Specifies the position of an instance.
Right
DynamicInstance.Right: Vector3
The right vector of this DynamicInstance
Example
part.Translate(part.Right * 5)
Rotation
DynamicInstance.Rotation: Vector3 = Vector3.New
Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
0 | any | - | |
45 | any | - | |
0 | any | - |
Specifies the rotation of an instance.
Size
DynamicInstance.Size: Vector3 = Vector3.New
Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
5 | any | - | |
10 | any | - | |
4 | any | - |
Specifies the size of an instance.
Up
DynamicInstance.Up: Vector3
The Y axis of this DynamicInstance
Quaternion
DynamicInstance.Quaternion: Quaternion
The quaternion of this DynamicInstance
LocalQuaternion
DynamicInstance.LocalQuaternion: Quaternion
The local quaternion of this DynamicInstance
Methods
LookAt
DynamicInstance:LookAt(rotation: Vector3)
Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
rotation | Vector3 | - |
Rotates the DynamicInstance so that the forward vector looks at the target.
Example
part.LookAt(Vector3.New(12, 34, 56))
LookAt
DynamicInstance:LookAt(rotation: Vector3, worldUp: Vector3)
Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
rotation | Vector3 | - | |
worldUp | Vector3 | - |
Rotates the DynamicInstance so that the forward vector looks at the target.
LookAt
DynamicInstance:LookAt(dynamicInstance: DynamicInstance)
Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
dynamicInstance | DynamicInstance | - |
Rotates the DynamicInstance so that the forward vector looks at the target.
Translate
DynamicInstance:Translate(translation: Vector3)
Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
translation | Vector3 | - |
Moves the transform in the direction and distance of translation.
Example
part.Translate(part.Forward * 5)
RotateAround
DynamicInstance:RotateAround(point: Vector3, axis: Vector3, angle: float)
Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
point | Vector3 | - | |
axis | Vector3 | - | |
angle | float | - |
Rotates the DynamicInstance around a point.
Rotate
DynamicInstance:Rotate(eulerAngles: Vector3)
Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
eulerAngles | Vector3 | - |
Rotates the DynamicInstance by the specified Euler angles.
InverseTransformPoint
DynamicInstance:InverseTransformPoint(point: Vector3): Vector3
Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
point | Vector3 | - |
Undocumented
TransformPoint
DynamicInstance:TransformPoint(point: Vector3): Vector3
Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
point | Vector3 | - |
Undocumented
InverseTransformDirection
DynamicInstance:InverseTransformDirection(direction: Vector3): Vector3
Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
direction | Vector3 | - |
Undocumented
TransformDirection
DynamicInstance:TransformDirection(direction: Vector3): Vector3
Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
direction | Vector3 | - |
Undocumented
InverseTransformVector
DynamicInstance:InverseTransformVector(vector: Vector3): Vector3
Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
vector | Vector3 | - |
Undocumented
InverseTransformPosition
DynamicInstance:InverseTransformPosition(position: Vector3): Vector3
Parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
position | Vector3 | - |
Undocumented