Page 1 of 1

How to generate objects using scripts?

Posted: 23 Apr 2024, 14:30
by Lnferior
I would like to implement a script command to add objects of different shapes during the simulation, and also to set whether these objects are affected by gravity or not.
Cheers

Re: How to generate objects using scripts?

Posted: 24 Apr 2024, 08:04
by coppelia
Hello,

have a look at following functions for example:
  • sim.createPrimitiveShape
  • sim.createMeshShape
  • sim.loadModel
  • sim.setObjectInt32Param(shapeHandle, sim.shapeintparam_respondable, respondable)
  • sim.setObjectInt32Param(shapeHandle, sim.shapeintparam_static, static)
  • sim.setShapeMass
  • sim.setShapeInertia
  • etc.
Cheers