Creating disc objects? And putting scripts on them at creation time
Posted: 04 Sep 2020, 16:44
I need an object in my scene to create disc objects which can then do things for themselves. I want this object to be able to create the discs, then load them with a script. I already know what this script will be, but it has a few variables in it which can have different valeus set at the moment of creation. I have two pieces of trouble.
1. sim.createPureShape doesn't seem to have options for a disc, only cubes. spheres, cylinders and cones. But disc (and plane) primitive objects can be made from the GUI, so surely must be producible from a lua script.
2. How do I get a (non-threaded child) script to appear on the new objects as they are created. It doesn't need to run immediately, if it only starts one or two simulation steps afetr the object is created that is fine. But I've still no idea how to do it.
Thank you
1. sim.createPureShape doesn't seem to have options for a disc, only cubes. spheres, cylinders and cones. But disc (and plane) primitive objects can be made from the GUI, so surely must be producible from a lua script.
2. How do I get a (non-threaded child) script to appear on the new objects as they are created. It doesn't need to run immediately, if it only starts one or two simulation steps afetr the object is created that is fine. But I've still no idea how to do it.
Thank you