I do not know if I catch a bug or I am just badly using one API's function
I'm progressing in my sorting chain project, and now, I aim to generate multiple type of cans from models that I created.
These cans do not have the same size and I do not want to hard code each of them.
So, to get cans' size, I thought about using
sim.getObjectSizeValues
, nevertheless I do not get result I expected.The code used is:
Code: Select all
h=sim.createPureShape(partType,19+4,{0.08,0.08,0.085},1,nil)
--h = sim.loadModel("models/mine/can_texture.ttm")
sim.setObjectParent(h,model,true)
--can_shape={0.08,0.08,0.085}
can_shape = sim.getObjectSizeValues(h)
a = sim.getObjectFloatParameter(h,sim.objfloatparam_objbbox_min_x)
b = sim.getObjectFloatParameter(h,sim.objfloatparam_objbbox_max_x)
print(can_shape)
print(a,b,(b-a))
Do you have an idea why I'm not getting expected results ?
Cheers