- Documentation
- Server functions
- setObjectProperty
Function
setObjectProperty
Stores an object physical property: "mass", "turn_mass", "air_resistance", "elasticity", "center_of_mass", "buoyancy".
Syntax
bool setObjectProperty(object theObject, string property, any value)Arguments
theObjectobject- The object.
propertystring- Property name.
valueany- Value (a number, or
{x, y, z}table forcenter_of_mass).
Returns
true on success, false for an unknown name.
Example
local obj = createObject(1225, 0, 0, 3)
setObjectProperty(obj, "elasticity", 0.8)
Notes
State for scripts. The object's physics in the game does not change.