Regular API function

sim.changeEntityColor

Description Changes the color of an entity, and returns its original color. Currently only takes into account collections and shapes. See also sim.restoreEntityColor.
C/C++
synopsis
C/C++
parameters
C/C++
return value
Lua
synopsis
map[] originalColorData=sim.changeEntityColor(int entityHandle,float[3] newColor,int colorComponent=sim.colorcomponent_ambient_diffuse)
Lua
parameters
entityHandle: the handle of a entity
newColor: a table to 3 rgb values, each between 0-1
colorComponent: a color component
Lua
return values
originalColorData: the original color data, to be used as argument with sim.restoreEntityColor
Python
synopsis
list originalColorData=sim.changeEntityColor(int entityHandle,list newColor,int colorComponent=sim.colorcomponent_ambient_diffuse)