Regular API function

simRemoveObject / sim.removeObject

Description
Removes an object from the scene. See also sim.removeModel.
Object destruction always tries to destroy attached scripts before destroying the object itself. If a script tries to destroy the object it is attached to, then the object will first be destroyed, and the script destruction will be delayed.
C/C++
synopsis
simInt simRemoveObject(simInt objectHandle)
C/C++
parameters
objectHandle: handle of the object to remove. sim.handle_all removes all objects from the scene
C/C++
return value
-1 if operation was not successful
Lua
synopsis
sim.removeObject(int objectHandle)
Lua
parameters
Similar to the C-function counterpart
Lua
return values
Python
synopsis
sim.removeObject(int objectHandle)