Regular API function

simSetShapeMaterial / sim.setShapeMaterial

Description Sets the material (used by the physics engines) of a specific shape. You might have to also call sim.resetDynamicObject for changes to take effect.
C synopsis simInt simSetShapeMaterial(simInt shapeHandle,simInt materialIdOrShapeHandle)
C parameters
shapeHandle: the handle of the shape. See also simGetObjectHandle.
materialIdOrShapeHandle: a predefined dynamic material ID, or the handle of another shape you wish to copy the material properties from.
C return value
-1 in case of an error.
Lua synopsis number result=sim.setShapeMaterial(number shapeHandle,number materialIdOrShapeHandle)
Lua parameters
Same as C-function
Lua return values
Same as C-function

All regular API functions on one page