Skip to main content

Scene3DModelRef

A reference to a 3D scene model instance

scene.model.pos.z = -10

Properties

pos

Scene3DModelRef.pos: Vec3

Get/Set the model position

pos_x

Scene3DModelRef.pos_x: number

Get/Set the model x position coordinate

pos_y

Scene3DModelRef.pos_y: number

Get/Set the model y position coordinate

pos_z

Scene3DModelRef.pos_z: number

Get/Set the model z position coordinate

rot

Scene3DModelRef.rot: Vec3

Get/Set the model rotation angles in radians

rot_x

Scene3DModelRef.rot_x: number

Get/Set the model x rotation angle in radians

rot_y

Scene3DModelRef.rot_y: number

Get/Set the model y rotation angle in radians

rot_z

Scene3DModelRef.rot_z: number

Get/Set the model z rotation angle in radians

velocity

Scene3DModelRef.velocity: Vec3

Get/Set the model velocity

velocity_x

Scene3DModelRef.velocity_x: number

Get/Set the model x velocity

velocity_y

Scene3DModelRef.velocity_y: number

Get/Set the model y velocity

velocity_z

Scene3DModelRef.velocity_z: number

Get/Set the model z velocity

spin

Scene3DModelRef.spin: Vec3

Get/Set the model spin

spin_x

Scene3DModelRef.spin_x: number

Get/Set the model x spin

spin_y

Scene3DModelRef.spin_y: number

Get/Set the model y spin

spin_z

Scene3DModelRef.spin_z: number

Get/Set the model z spin

Functions

clone

Scene3DModelRef:clone() → Scene3DModelRef--

cloned model instance

Clone the model to a new instance

remove

Scene3DModelRef:remove() → ()

Removes the model from all scenes it is attached to

Show raw api
{
    "functions": [
        {
            "name": "clone",
            "desc": "Clone the model to a new instance",
            "params": [],
            "returns": [
                {
                    "desc": "cloned model instance",
                    "lua_type": "Scene3DModelRef"
                }
            ],
            "function_type": "method",
            "source": {
                "line": 16,
                "path": "../../res/data/script/lib/system/scene3d_model.lua"
            }
        },
        {
            "name": "remove",
            "desc": "Removes the model from all scenes it is attached to",
            "params": [],
            "returns": [],
            "function_type": "method",
            "source": {
                "line": 23,
                "path": "../../res/data/script/lib/system/scene3d_model.lua"
            }
        }
    ],
    "properties": [
        {
            "name": "pos",
            "desc": "Get/Set the model position",
            "lua_type": "Vec3",
            "source": {
                "line": 31,
                "path": "../../res/data/script/lib/system/scene3d_model.lua"
            }
        },
        {
            "name": "pos_x",
            "desc": "Get/Set the model x position coordinate",
            "lua_type": "number",
            "source": {
                "line": 38,
                "path": "../../res/data/script/lib/system/scene3d_model.lua"
            }
        },
        {
            "name": "pos_y",
            "desc": "Get/Set the model y position coordinate",
            "lua_type": "number",
            "source": {
                "line": 45,
                "path": "../../res/data/script/lib/system/scene3d_model.lua"
            }
        },
        {
            "name": "pos_z",
            "desc": "Get/Set the model z position coordinate",
            "lua_type": "number",
            "source": {
                "line": 52,
                "path": "../../res/data/script/lib/system/scene3d_model.lua"
            }
        },
        {
            "name": "rot",
            "desc": "Get/Set the model rotation angles in radians",
            "lua_type": "Vec3",
            "source": {
                "line": 58,
                "path": "../../res/data/script/lib/system/scene3d_model.lua"
            }
        },
        {
            "name": "rot_x",
            "desc": "Get/Set the model x rotation angle in radians",
            "lua_type": "number",
            "source": {
                "line": 65,
                "path": "../../res/data/script/lib/system/scene3d_model.lua"
            }
        },
        {
            "name": "rot_y",
            "desc": "Get/Set the model y rotation angle in radians",
            "lua_type": "number",
            "source": {
                "line": 72,
                "path": "../../res/data/script/lib/system/scene3d_model.lua"
            }
        },
        {
            "name": "rot_z",
            "desc": "Get/Set the model z rotation angle in radians",
            "lua_type": "number",
            "source": {
                "line": 79,
                "path": "../../res/data/script/lib/system/scene3d_model.lua"
            }
        },
        {
            "name": "velocity",
            "desc": "Get/Set the model velocity",
            "lua_type": "Vec3",
            "source": {
                "line": 86,
                "path": "../../res/data/script/lib/system/scene3d_model.lua"
            }
        },
        {
            "name": "velocity_x",
            "desc": "Get/Set the model x velocity",
            "lua_type": "number",
            "source": {
                "line": 93,
                "path": "../../res/data/script/lib/system/scene3d_model.lua"
            }
        },
        {
            "name": "velocity_y",
            "desc": "Get/Set the model y velocity",
            "lua_type": "number",
            "source": {
                "line": 100,
                "path": "../../res/data/script/lib/system/scene3d_model.lua"
            }
        },
        {
            "name": "velocity_z",
            "desc": "Get/Set the model z velocity",
            "lua_type": "number",
            "source": {
                "line": 107,
                "path": "../../res/data/script/lib/system/scene3d_model.lua"
            }
        },
        {
            "name": "spin",
            "desc": "Get/Set the model spin",
            "lua_type": "Vec3",
            "source": {
                "line": 114,
                "path": "../../res/data/script/lib/system/scene3d_model.lua"
            }
        },
        {
            "name": "spin_x",
            "desc": "Get/Set the model x spin",
            "lua_type": "number",
            "source": {
                "line": 121,
                "path": "../../res/data/script/lib/system/scene3d_model.lua"
            }
        },
        {
            "name": "spin_y",
            "desc": "Get/Set the model y spin",
            "lua_type": "number",
            "source": {
                "line": 128,
                "path": "../../res/data/script/lib/system/scene3d_model.lua"
            }
        },
        {
            "name": "spin_z",
            "desc": "Get/Set the model z spin",
            "lua_type": "number",
            "source": {
                "line": 135,
                "path": "../../res/data/script/lib/system/scene3d_model.lua"
            }
        }
    ],
    "types": [],
    "name": "Scene3DModelRef",
    "desc": "A reference to a 3D scene model instance\n\n```lua\nscene.model.pos.z = -10\n```",
    "source": {
        "line": 9,
        "path": "../../res/data/script/lib/system/scene3d_model.lua"
    }
}