Lua Class - scene

scene is a class in the Teverse Lua API that contains 4 properties, 4 methods and 0 events.

This class cannot be constructed, it is managed by Teverse.

Properties
READONLY
Undocumented camera

CODE SAMPLE
print(scene.camera) --> Undocumented
READONLY
table children

CODE SAMPLE
print(scene.children) --> {}
vector3 gravity

CODE SAMPLE
scene.gravity = vector3(10, 10, 10)
print(scene.gravity) --> vector3(10, 10, 10)
boolean simulate

CODE SAMPLE
scene.simulate = true
print(scene.simulate) --> true
Methods
sceneObject child( string name )

Returns nil if not found

CODE SAMPLE
scene:child("") --> sceneObject
destroyChildren( )

Destroys all children

CODE SAMPLE
scene:destroyChildren() --> 
table raycast( vector3 a , vector3 b )

Returns a table of dictionaries for each hit. Example dict: {hit=,position=,normal=}

CODE SAMPLE
scene:raycast(vector3(10, 10, 10), vector3(10, 10, 10)) --> {}
sceneObject, vector3, vector3 raycastOne( vector3 a , vector3 b )

Returns an object, pos, normal or nil if there is no hit

CODE SAMPLE
scene:raycastOne(vector3(10, 10, 10), vector3(10, 10, 10)) --> sceneObject,  vector3,  vector3
Events

Some sections of our docs are maintained on github.