I want to change an object's shape by customization script, but the Lua API
function ”sim.setObjectSizeValues(obs,shape_value)“ has no effect nor the
console gives any errors.
How to correctly use "sim.setObjectSizeValues(obs,shape_value)"?
How to use the Lua script to change an object's shape?
-
- Posts: 2
- Joined: 24 Jun 2021, 10:04
Re: How to use the Lua script to change an object's shape?
Hello,
from the documentation,
Additional functions that can be useful are float[3] xyzSize=sim.getShapeBB(number shapeHandle) and sim.setShapeBB(number shapeHandle,float[3] xyzSize) (with CoppeliaSim V4.2.0+, currently undocumented function).
Cheers
from the documentation,
sim.setObjectSizeValues
has no influence on the object real sizes. Instead, use sim.scaleObjects
(isometric scaling) and sim.scaleObject
(non-isometric scaling when possible).Additional functions that can be useful are float[3] xyzSize=sim.getShapeBB(number shapeHandle) and sim.setShapeBB(number shapeHandle,float[3] xyzSize) (with CoppeliaSim V4.2.0+, currently undocumented function).
Cheers