object creation
Posted: 27 Feb 2020, 12:19
Hi im using this code to create objects infinitely once in a while
The problem is that when i press to finish simulating it creates like 200 objects in an instant and it always crashes my computer but i cant find a reason why can anyone help ?
Code: Select all
local CULLED_BACKFACES=1
local VISIBLE_EDGES=2
local APPEAR_SMOOTH=4
local RESPONDABLE_SHAPE=8
local STATIC_SHAPE=16
local CYL_OPEN_ENDS=32
local tblSize={0.06,0.06,0.06}--cube size
while true do
local hndShape=sim.createPureShape(0,RESPONDABLE_SHAPE+VISIBLE_EDGES,tblSize,0.1,NULL)
sim.setObjectPosition(hndShape,-1,{-0.3750,-0.2000,0.0500})
--maje cube detectable
sim.setObjectSpecialProperty(hndShape,sim.objectspecialproperty_detectable_all)
sim.wait(15)
end