Repository navigation
API ‐ Components
The Engine has a compositional object system. GameObjects have "base" APIs (properties, methods, events) that can be extended by giving them "components." These are transparent to scripts, adding a Component immediately makes their properties etc accessible via the Object. All components, as well as the base API, are described below.
Enabled: booleanIf this is false, the Engine will not render, compute physics for or otherwise update this Object and its subtree
Name: stringThe name of the Object, usually what was passed into GameObject.new
read ObjectId: numberThe ID of the Object, an integer. Remains the same throughout the session, but not guaranteed between sessions
Parent: GameObject?The hierarchal parent of the Object, or nil if it does not have one
Serializes: booleanWhether or not the Object should be saved with the scene if it is serialized with AssetManager:SaveScene, and whether :Duplicate will duplicate it (only applies to descendants)
read TreeEnabled: booleanWhether this object and all of its ancestors are enabled
function AddComponent(Component: keyof<Creatables>)Adds the specified Component to the Object. Will error if it already has it (use :HasComponent to check beforehand)
function AddTag(Tag: string)Adds a Collections tag to the Object. Has no effect if the Object already has the tag
function AsComponent<T>(Component: T & keyof<Components>): (GameObject & index<Components, T>)?Returns nil if the component does not exist on the object, and, in Luau, a narrowed type if it does
function Destroy()Marks the Object as "pending for destruction". This may or may not remove the Object from memory immediately, depending on whether the Engine is keeping a internal reference to it
function Duplicate<T>( & T): GameObject & TCreates a duplicate of the Object
function FindChild(ChildName: string): GameObject?Returns a child Object with the given name, or nil if one doesn't exist
function FindChildWithComponent<T>(T & keyof<Components>): GameObject & index<Components, T>Returns a child Object which has the given component, or nil if one doesn't exist
function GetChildren(): { GameObject }Returns a list of the Object's direct children
function GetComponents(): { keyof<Creatables> }Returns a list of the names of all Components that the Object currently has
function GetDescendants(): { GameObject }Returns all descendants of the Object (i.e. its children, and their children, etc)
function GetFullName(): stringReturns the full, hierarchal path of the Object
function GetTags(): { string }Returns a list of all tags the Object has
function HasComponent(Component: keyof<Creatables>): booleanReturns whether or not the Object has the given Component
function HasTag(Tag: string): booleanReturns whether or not the Object has the given Collections tag
function IsDescendantOf(Ancestor: GameObject): booleanReturns whether or not the Object is a descendant (child or indirect child) of the given object
function RemoveComponent(Component: keyof<Creatables>)Removes the specified Component from the Object. Will error if does not have it (use :HasComponent to check beforehand)
function RemoveTag(Tag: string)Removes the given Collections tag from the Object. Has no effect if the Object does not have the tag
OnTagAdded:Connect(function(Tag: string)Fires when the Object receives a new tag, passing the tag to the callback
OnTagRemoved:Connect(function(Tag: string)Fires when the Object loses a tag, passing the tag to the callback
OnTreeEnabledChanged:Connect(function(TreeEnabled: boolean)Fires when the value of .TreeEnabled changes
OnWorkspaceChanged:Connect(function(Previous: GameObject, Current: GameObject)Fires when the Object moves between Workspaces
An animation
Animation: stringThe animation file
Looped: booleanWhether the track should loop when it reaches the end
Playing: booleanWhether the track is playing
Time: numberThe current time position of the track
Weight: numberThe influence the track has over the rig. Not implemented yet
- Animates
Animating: booleanWhether the Animator will step its animations
Used to manipulate assets within the Engine
function GetMeshData(Id: string): MeshAssetDataReturns the provided mesh data associated with the provided path
function ImportModel(Path: string): GameObject & EcModel & EcTransformImports the glTF 2.0 model at the provided path and returns it as a Model GameObject
function LoadScene(Path: string): ({ GameObject }?, string)Loads GameObjects from the scene file at the provided path, returning a list of the root objects or nil and an error message upon failure
function QueueLoadTexture(Path: string, LoadInLinearSpace: boolean?)Queues a texture to be preloaded
function SaveMesh(Id: string, Path: string)Saves the mesh data at the provided path to a file
function SaveScene(RootNodes: { GameObject }, Path: string): (boolean, string?)Saves the list of GameObjects to the provided path, returning whether the operation succeeded
function SetMeshData(Id: string, MeshData: MeshAssetData | buffer)Associates the provided mesh data with the provided path
function UnloadMaterial(Material: string)Removes the given Material path from the Engine's cache
function UnloadMesh(Mesh: string)Removes the given Mesh path from the Engine's cache
function UnloadTexture(Texture: string)Removes the given texture from the Engine's cache, forcing it to be reloaded upon next use
- Represents a Bone of a Mesh
- Created automatically when the asset of a
Meshcomponent finishes loading
read IsActive: booleanWhether or not the Bone Object is actively affecting a Mesh
read SkeletalBoneId: numberThe internal ID of the bone, valid range is 0-255
read TargetMesh: GameObjectThe Mesh component containing Object the Bone is currently targeting. Note that this property is read-only, and will only either be equal to the Mesh that created the Bone, or nil
Transform: MatrixThe transformation of the Bone
A 3D camera
FieldOfView: numberThe field-of-view. By default, 90
UseSimpleController: booleanWhether it is affected by the built-in controller (W/A/S/D horizontal movement, Q/E vertical, Mouse to look around)
- Manage Collections of Objects with tags
- An Object can have any number of tags
- Tags can be added to Objects with
Object:AddTag, removed withObject:RemoveTag, and checked withObject:HasTag
function GetCollections(): { string }Returns a list of all collections that the Collections system has recognized. They may be empty. Order is not guaranteed
function GetComponentCreatedSignal<T>(Component: T & keyof<Components>, DataModel: (GameObject & EcDataModel)?): EventSignal<(Object: GameObject & index<Components, T>) -> (), GameObject & index<Components, T>>Returns a signal that fires when a given component is created from the world
function GetComponentDeletedSignal(Component: keyof<Components>, DataModel: (GameObject & EcDataModel)?): EventSignal<(Object: GameObject) -> (), GameObject>Returns a signal that fires when a given component is deleted from the world
function GetObjectsWithComponent<T>(Component: T & keyof<Components>, DataModel: (GameObject & EcDataModel)?): GameObject & index<Components, T>Returns a list of all objects with the given component
function GetTagAddedSignal(Tag: string): EventSignal<(Object: GameObject) -> (), GameObject>Returns a signal that fires when the given tag is added to any Objects
function GetTagRemovedSignal(Tag: string): EventSignal<(Object: GameObject) -> (), GameObject>Returns a signal that fires when the given tag is removed from any Objects, including when an Object with a tag is :Destroy'd
function GetTagged(Tag: string): { GameObject }Returns a list containing all Objects with the given tag
function Query<C>({ read ComponentDefinition & C }): { GameObject & C }Returns a list of all objects with the specified Luau components
The root of the scene
read AreScriptsBound: booleanIf this is true, attempting to change .LiveScripts will throw an error
LiveScripts: stringMay either refer to a directory of Scripts, or a single Script, to run when the DataModel is bound
read Time: numberNumber of seconds since the Engine started running
VM: stringThe Luau Virtual Machine that Scripts bound to this Data Model will run in
function BindToClose(Callback: () -> ())Sets a callback that is invoked when the datamodel is being destroyed. May only be called once. Callback cannot yield
function Close(ExitCode: number?)Closes the application with the specified exit code integer or 0
function GetService<T>(Service: keyof<Services> & T): GameObject & index<Services, T>Gets the Object representing the specified Service. If it does not exist yet in the Data Model, it is created
Closing:Connect(function()This event fires when the datamodel is closing. Do not yield within the callback as the thread may never be resumed again
OnFrameBegin:Connect(function(DeltaTime: number)Fires at the beginning of a frame, passing in the time elapsed since the last frame (delta time)
Built-in development tools
DocumentationShown: booleanWhether the Documentation tool is enabled
ExplorerShown: booleanWhether the Explorer tool is enabled
InfoShown: booleanWhether the Info tool is enabled
read Initialized: booleanWhether developer tools were ever initialized
MaterialsShown: booleanWhether the Materials tool is enabled
PropertiesShown: booleanWhether the Properties tool is enabled
RendererShown: booleanWhether the Renderer tool is enabled
ScriptsShown: booleanWhether the Scripts tool is enabled
SettingsShown: booleanWhether the Settings tool is enabled
ShadersShown: booleanWhether the Shaders tool is enabled
function CloseTextDocuments()Saves and closes all open text documents
function GetDocumentBreakpoints(File: string): { DebugBreakpointInfo }Gets a list of all breakpoints associated with a text document. If it is not open, returns an empty table
function GetExplorerSelections(): { GameObject }Returns what is currently selected in the Explorer
function GetOpenTextDocuments(): { string }Gets a list of all open text documents
function GetToolNames(): { string }Returns a list of valid Engine tools
function Initialize()Initializes the developer tools system if it was not already initialized
function IsToolEnabled(ToolName: string): booleanReturns whether the given tool is enabled
function OpenTextDocument(Path: string, Line: number?, TakeFocus: boolean?)Opens a text file. This requires Developer Mode to be enabled to have any effect
function SaveTextDocuments()Saves all open text documents
function SetDocumentBreakpoints(File: string, Breakpoints: { read DebugBreakpointInfo })Sets the breakpoints of a text document. This will queue if the document is not open at the time of the call
function SetExplorerRoot(Root: GameObject)Changes the Root of the built-in Explorer's hierarchy view
function SetExplorerSelections(Selections: { GameObject })Changes the built-in Explorer's Object selections to the specified Objects
function SetToolEnabled(ToolName: string, Enabled: boolean)Enabled/disables the given tool
BreakpointRemoved:Connect(function(File: string, Line: number)Fires when a breakpoint is removed
BreakpointUpdated:Connect(function(File: string, Breakpoint: DebugBreakpointInfo)Fires when a breakpoint is added or modified
DebuggerRequestedStop:Connect(function()Fires when the developer clicks 'Stop' in the debugger
Intended to model a large light source infinitely far away, like the Sun
Brightness: numberHow bright the Light is
Direction: vectorThe direction light is emitted from
LightColor: ColorThe color of the Light
ShadowViewDistance: numberHow far back the shadow view is offset from the focus
ShadowViewFarPlane: numberThe Far Z plane of the shadow view. Should be greater than ShadowViewNearPlane
ShadowViewMoveWithCamera: booleanSets the focus of the shadow view to be the Scene Camera
ShadowViewNearPlane: numberThe Near Z plane of the shadow view. Should be less than ShadowViewFarPlane. Shouldn't be 0
ShadowViewOffset: vectorOffset of the shadow view from the focus, after ShadowViewDistance is applied
ShadowViewSize: numberSize of the shadow view. Sets ShadowViewSizeH and ShadowViewSizeV to the assigned value if they are equal. Is -1 if they are not equal
ShadowViewSizeH: numberHorizontal size of the shadow view
ShadowViewSizeV: numberVertical size of the shadow view
Shadows: booleanWhether the Light can render shadows
Inspect and manipulate various parts of the Engine
read CommitHash: stringThe Git commit that was used to produce this Engine build
read CommitTag: stringThe relationship between the Engine's commit at the nearest Release tag
read Framerate: numberThe Engine's current framerate
FramerateCap: numberThe maximum framerate the Engine will reach before attempting to self-limit
read IsHeadless: booleanWhether the Engine is currently running in headless mode
read TargetPlatform: stringThe target platform the Engine was compiled for (Windows or Linux, usually)
read Version: stringThe version of the Engine build
function BindDataModel(DataModel: GameObject & EcDataModel, State: { read Rendered: boolean, read Simulated: boolean })Binds the datamodel provided. Bound datamodels fire their OnFrameBegin events
function GetCliArguments(): { string }Returns the list of launch arguments given to the Engine. The first item is always a path to the Engine executable
function GetConfigValue(Key: string): JsonDecodableReturns the value associated with the given Key in the Engine's loaded configuration (phoenix.conf)
function SetForegroundDataModel(DataModel: GameObject & EcDataModel)Switches the foreground datamodel to the one provided. Foreground datamodels are what are rendered on screen
function SetWindowTitle(Title: string)Sets the title of the game window
function ShowMessageBox(Title: string, Message: string, Buttons: 'ok' | 'okcancel' | 'yesno' | 'yesnocancel' | nil, Icon: 'info' | 'warning' | 'error' | 'question' | nil, DefaultButton: number?): numberShows a message box to the player with the given specification. The returned number with be the selected option: 0 for Cancel/No, 1 for Ok/Yes, 2 for No in yesnocancel. This is a blocking operation and no scripts or other parts of the Engine run until the message is dismissed. Avoid using quotes and backticks in the message
function UnbindDataModel(DataModel: GameObject & EcDataModel)Unbinds a previously bound datamodel
World lighting and ambiance
AmbientLight: ColorBase environment ambient light color (Uniform: Phoenix_LightAmbient)
BloomEnabled: booleanWhether bloom is enabled
BloomScale: numberThe sample size for the bloom relative to the screen
BloomStdDeviation: numberThe standard deviation for the gaussian function used for the bloom, affecting the "width"
BloomThreshold: numberThe threshold luminance at which pixels should bloom
Fog: booleanFog enablement (Uniform: Phoenix_Fog)
FogColor: ColorColor of the fog (Uniform: Phoenix_FogColor)
GammaCorrection: numberPost-processor gamma correction amount (Uniform: Phoenix_Gamma)
PostProcess: booleanPost-processor enablement (Uniform: Phoenix_PostFxEnabled)
Skybox: stringThe skybox asset. May either be a path directly to an equirectangular panorama image, or a directory containing [right/left/top/bottom/front/back].jpg (cubemap). Will error when attempting to assign an invalid path. Cubemap directory paths must contain 'Sky' (case-sensitive) somewhere in them :)
Service for implementing Undo/Redo systems
read ActionHistorySize: numberThe total number of Actions that have finished being recorded
read CanRedo: booleanWhether :Redo will succeed
read CanUndo: booleanWhether :Undo will succeed
read CurrentActionName: string?The name of the Action currently being recorded, or nil if no recording is in progress
read CurrentWaypoint: numberThe ID of the Action that was last finished
read IsRecordingAction: booleanWhether an Action is currently being recorded by History
RecordingEnabled: booleanWhether events will be recorded
TargetDataModel: GameObjectThe DataModel that History will track
function ClearHistory()Clears all recorded history
function DiscardAction(Id: number)Discards the Action by its ID
function FinishAction(Id: number)Finishes the Action by its ID. Only one Action may be active at a time
function GetActionData(Index: number): HistoryActionRetrives information about a previously-recorded Action by its Index (Indexes, separate from IDs, are in the range 0 <= Index < ActionHistorySize)
function GetCannotRedoReason(): stringReturns a message explaining why .CanRedo is false
function GetCannotUndoReason(): stringReturns a message explaining why .CanUndo is false
function GetCurrentActionData(): HistoryAction?Retrieves information about the current Action being recorded
function Redo()Forwards the state of the scene to how it was before the last Undo. If .CanRedo is false, will throw an error
function TryBeginAction(Name: string): number?Attempts to begin an "Action." Returns the ID of the action. May fail and return nil. Only one Action may be active at a time
function Undo()Reverses the state of the scene to how it was before the last Action began. If .CanUndo is false, will throw an error
- Contains the player's interface elements
- See
UITransform,UIFrame,UIText,UIImage, andUIButton
No members defined
Engine logging
function Write(Message: string, Type: EnumLogType, ExtraTags: string?)Log a message
OnMessaged:Connect(function(Time: number, Type: EnumLogType, Message: string, ExtraTags: string, Values: { LoggingLogValue })Fires whenever a Log Message is created
Internally stores what Luau components attached to the object.
No members defined
A mesh composed of triangles
CastsShadows: booleanWhether it casts shadows
FaceCulling: EnumFaceCullingWhich faces of the mesh to cull based on viewing direction. See the FaceCulling enum
Material: stringThe name of the .mtl in the resources/materials/ directory it should use
MeshAsset: stringThe path to the underlying .hxmesh file, or a built-in identifier like !Quad or !Cube
MetalnessFactor: numberMetalness modifier
RoughnessFactor: numberRoughness modifier
Tint: ColorThe Color it should be tinted with
Transparency: numberIts transparency/translucency
A container
ImportPath: stringThe original file a model was imported from
Networking
function MakeHttpRequestAsync({ Url: string, Method: nil | 'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'PATCH', Headers: { [string]: string }?, Body: string? }): { Ok: boolean, Status: number, Headers: { [string]: string }, Body: string }Makes an HTTP request to the provided URL. Ok will be false upon failure, and Body will contain the error message
An emitter of 2D particles
Emitting: booleanWhether the emitter should emit new particles
Image: stringThe path to the image to use for the particles
Lifetime: vectorThe X and Y components act as a range of how long any particle can last, in seconds
LinearlySmoothened: booleanWhether the particle image is smoothened
ParticlesAreAttached: booleanWhether the particles are attached to and move with the emitter
Rate: numberAn integer indicating how many particles should be emitted per second (must be above or equal to 0)
Manipulate the Physics simulation of the Engine
DebugCollisionAabbs: booleanWhether physics collision AABBs are rendered
DebugContactPoints: booleanWhether Contact Points are rendered
DebugSpatialHeat: booleanWhether Spatial Heat (spatial hash density) debug rendering is enabled
Gravity: vectorThe gravitational field strength
Simulating: booleanWhether the Physics simulation is running. IMPORTANT: The Editor sets this value to true and false when starting/stopping playtests
Timescale: numberSlow-down or speed-up the simulation by changing this value from 1
function SetSimulationForcePaused(Paused: boolean)If passed true, forces the simulation to be paused, regardless of the value of .Simulating
Checking player inputs
Cursor: EnumCursorThe look of the cursor. See Enum.Cursor. Setting this property is slow as it needs to poll the OS, avoid placing it in hot loops
CursorMode: EnumCursorModeThe current mode/behaviour of the cursor. Refer to the Enum.CursorMode enumeration
read IsKeyboardSunk: booleanWhether the Engine is currently using keyboard input (such as for Dear ImGui). Do not process keyboard input if this is true
read IsMouseSunk: booleanWhether the Engine is currently using mouse input (such as for Dear ImGui). Do not process mouse input if this is true
function GetCursorPosition(): vectorReturns the current position of the mouse cursor relative to the window as a vector
function GetViewportInputRect(): (vector, vector)Gets the input rectangle area, returning its position and size
function IsKeyPressed(Key: EnumKey): booleanReturns whether the specified key (e.g. Enum.Key.A, Enum.Key.One) is currently being pressed
function IsMouseButtonPressed(Button: EnumMouseButton): booleanReturns whether the specified mouse button (Enum.MouseButton.Left/Middle/Right) is currently being pressed
function ResetViewportInputRect()Resets the Engine's understanding of where the viewport is on screen back to the default (occupying the entire window)
function SetViewportInputRect(Position: vector, Size: vector)Configures the Engine to act as through the Viewport is at the given position with the given size. Does not change where the viewport is actually rendered
KeyEvent:Connect(function(Event: KeyInputEvent)Fires whenever a key-related event occurs
MouseButtonEvent:Connect(function(Event: MouseButtonInputEvent)Fires whenever a mouse-button-related event occurs
ScrollEvent:Connect(function(Event: ScrollInputEvent)Fires whenever the player scrolls with a scroll device (such as the mouse wheel)
A light source emitting light omnidirectionally from its Transform
Brightness: numberHow bright the Light is
LightColor: ColorThe color of the Light
Range: numberHow far light is emitted. If >= 0, the Range is used and attenuation is linear, otherwise it uses the formula F = 1/D^2 * B to mirror real-world attenuation, where F is the final brightness, D is the distance of a point from the Light, and B is the Brightness property's value
Interfacing with the Engine's rendering systems
DebugWireframeRendering: booleanWhether the Wireframe rendering debug mode is enabled
IsFullscreen: booleanWhether the Window is currently fullscreened
Resolution: vectorThe size of the window, in pixels
VSync: booleanWhether Vertical Synchronization is enabled
function SetShaderTextureVariable(Shader: string, Variable: string, TexturePath: string, InLinearColorSpace: boolean)Sets a variable in a shader program to a 2D texture sampler for the provided image. The program will be loaded if it is not already in memory
function SetShaderVariable(Shader: string, Variable: string, Value: boolean | number | vector | Color | Matrix, Type: EnumValueType?)Sets a variable in a shader program (qualified uniform). The program will be loaded if it is not already in memory. Type is required when passing a vector, to differentiate between Vector2 and Vector3. See Enum.ValueType
Something rigid that participates in the Physics simulation
AngularVelocity: vectorIts rotational velocity
CollisionType: EnumCollisionTypeDetermines how collisions are detected. See the CollisionType enum
Density: numberIts density (Mass = Density * Size)
Friction: numberFraction of Velocity it should lose per second while in contact with another object while PhysicsDynamics is true
GravityFactor: numberInfluence of the force of gravity
HullsFile: stringThe file containing a set of convex hull meshes to load. Used for when .CollisionType is Hulls
LinearVelocity: vectorIts velocity
PhysicsCollisions: booleanWhether other physics objects can collide with it
PhysicsDynamics: booleanWhether the Physics engine should apply forces to it
PhysicsRotations: booleanWhether the Physics engine will apply angular impulses to rotate the object on collisions. Prefer to keep this at false as the simulation is not very precise
Restitution: numberRestitution
Managing Luau
function CloseVM(VmName: string)Closes the specified Luau VM, releasing its resources
function CompileToBytecode(Source: string, OptimizationLevel: number?, DebugLevel: number?): bufferCompiles the given Luau source code to Luau bytecode. OptimizationLevel and DebugLevel may be 0-2, or -1 for default
function CreateVM(VmName: string)Creates a new Luau VM with the given name. The workspace and game globals of the VM are taken from the currently-bound DataModel
function DetachDebuggerFromVM(VM: string)Detaches the Developer-mode exclusive debugger from a VM, if it is attached. No effect otherwise
function RunInVM(VmName: string, Code: string, ChunkName: string): (boolean, string?)Runs the given code in the specified VM. Returns false and an error message upon failure or if the code does not finish executing (yield or break)
function SetScriptBreakpoint(VM: string, ScriptPath: string, Line: number, Enabled: boolean): numberSets the breakpoint for a given script, returning the line number it was applied to. If the script has not loaded yet, it will queue the breakpoint and return the requested line number. The line number may be different than what was requested. Changes for queued breakpoints are signaled by .BreakpointMoved
function SetVMAllowedExecutionTime(VmName: string, Length: number)Sets how long script coroutines are allowed to run for, in seconds, before yielding. Scripts that overrun this duration will error
BreakpointMoved:Connect(function(File: string, RequestedLine: number, ActualLine: number)Fires when a breakpoint queued by :SetScriptBreakpoint is applied to a different line number than originally requested
A sound
read FinishedLoading: booleanWhether the Sound has finished loading the SoundFile
read Length: numberThe length of the sound in seconds
read LoadSucceeded: booleanWhether or not the sound loaded successfully
Looped: booleanWhether playback should loop once it reaches the end
Playing: booleanWhether the Sound is currently playing (or requested to play, if .Playing is set to true by a Script before it has finished loading)
SoundFile: stringThe sound file to be played
Speed: numberThe speed at which the sound plays, within the range of 0.01 to 100
TimePosition: numberThe playback position of playback in number of seconds from the beginning of the file
Volume: numberThe volume at which the sound plays. Must be positive
function Play()Play the Sound from the beginning
A light which emits in a conical shape
Angle: numberThe Field-of-View (in radians) of light emission
Brightness: numberHow bright the Light is
LightColor: ColorThe color of the Light
Range: numberHow far light is emitted
Gives a physical position and size to an Object
LocalTransform: MatrixThe Object's transformation, relative to its parent Transform ancestor or the world origin
Transform: MatrixThe Object's world-space transformation
OnScriptMoved:Connect(function(Previous: Matrix, Current: Matrix)Fires when a script moves the object
Button behaviour
IsClicking: booleanWhether the cursor is currently holding the button down
IsHovering: booleanWhether the cursor is currently hovering over the button
ClickChanged:Connect(function(IsHolding: boolean)Fires when the button click state changes
HoverChanged:Connect(function(IsHovering: boolean)Fires when the button hover state changes
A frame
BackgroundColor: ColorThe color of the frame
BackgroundTransparency: numberIts transparency
An image element
Image: stringThe path to the image
ImageTint: ColorThe color the image is tinted with
ImageTransparency: numberIts transparency
- Text
- The scale depends on the minimum of the two axes of Size
Text: stringThe text string to be displayed
TextColor: ColorThe color of the text
TextTransparency: numberThe transparency of the text
Offsets the element tree
Position: vectorThe 2D position, from 0-1
Rotation: numberThe 2D rotation (not functional)
Size: vectorThe 2D scale, from 0-1
ZIndex: numberThe ordering indexing, higher being further in front (not functional)
- The container used for storing the main parts of a scene (3D objects)
- If this is
Destroy'd, the application closes
SceneCamera: GameObject & EcCamera & EcTransformThe Camera the Player sees the world through. If set to nil, a fallback is created at the origin
function GetObjectsInAabb(Position: vector, Size: vector, IgnoreList: { GameObject }?): { GameObject & EcRigidBody & EcTransform }Get a list of Objects whose bounds are within the AABB
function Raycast(Origin: vector, CastVector: vector, FilterList: { GameObject }?, FilterIsIgnoreList: boolean?): { Object: GameObject & EcRigidBody & EcTransform, Position: vector, Normal: vector }?Cast a ray. This currently treats collisions as Axis-Aligned Bounding Boxes!
function ScreenPointToVector(ScreenPoint: vector, Length: number?): vectorConverts the provided screen coordinates to a world-space direction. Length is optional and 1.0 by default
function WorldToScreenPoint(WorldPoint: vector): (vector, number)Converts the provided world coordinate (vector) into its location in screen-space pixel coordinates, additionally returning the depth