scene
Contents
| Name | Description |
|---|---|
| ELT_DIRECTIONAL | A sun light |
| ELT_POINT | A point light |
| ELT_SPOT | A spot light |
| newfpscamera( ) | Create an fps camera. |
| newiscenecamera( position , lookat [, parent ] ) | Create a new camera |
| newlight( radius , position ) | Create a light |
| newmayacamera( ) | Create a maya camera |
| newmesh( path ) | Create a mesh |
ELT_DIRECTIONAL
ELT_POINT
ELT_SPOT
newfpscamera( )
Create an fps camera.
Create a camera with default first person shooter controls. The camera and be rotated with the mouse, and moved with the arrow keys.
Returns
-
The camera
Defined at client/lua_api/scene/icamera.cpp:61
newiscenecamera( vector3d position , vector3d lookat [ , iscenenode parent ] )
Create a new camera
Creates a new camera at the given position.
Parameters
-
position (vector3d)
The position to create the camera in
-
lookat (vector3d)
A vector for the camera to look at. Use this to set it's rotation.
-
parent (optional) (iscenenode)
A node to parent this camera to. If the parent moves, the camera will move with it.
Returns
-
The camera
Defined at client/lua_api/scene/icamera.cpp:99
newlight( number radius , vector3d position )
Create a light
Creates a light that illuminates the surrounding objects dynamically.
Parameters
-
radius (number)
The radius that the light should shine
-
position (vector3d)
The position to create the light at
Returns
-
The created light
Defined at client/lua_api/scene/ilight.cpp:33
newmayacamera( )
Create a maya camera
Creates a camera that can be controlled with maya style controls by default, click and drag rotates the camera, while right click and mouse up/down zooms in or out.
Returns
-
nil
Defined at client/lua_api/scene/icamera.cpp:32
newmesh( string path )
Create a mesh
Creates a mesh in the scene.
Parameters
-
path (string)
The path to the model to load
Returns
-
The mesh that was created.
Defined at client/lua_api/scene/imesh.cpp:32