How to generate objects using scripts?

Typically: "How do I... ", "How can I... " questions
Post Reply
Lnferior
Posts: 23
Joined: 20 Jul 2022, 17:49

How to generate objects using scripts?

Post 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

coppelia
Site Admin
Posts: 10378
Joined: 14 Dec 2012, 00:25

Re: How to generate objects using scripts?

Post 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

Post Reply