Hello! Thank you for your product.
It seems that API function setObjectFloatParam() doesn't work properly for
these light object parameters:
- sim.lightfloatparam_const_attenuation
- sim.lightfloatparam_lin_attenuation
- sim.lightfloatparam_quad_attenuation
- sim.lightfloatparam_spot_cutoff
However, with sim.lightfloatparam_spot_exponent it works (if I use
Spotlight object).
I used Python script launched outside of CoppeliaSim and Lua-script
launched inside it to check whether setObjectFloatParam() works or not.
Also I tried to run it in different conditions: simulation is stopped/light
is off and so on. For example, here are results of attempt to change
sim.lightfloatparam_const_attenuation parameter of Ominidirectional_light
object in Python-script:
objectHandle = sim.getObject('/Omnidirectional_light')
retval_1 = sim.getObjectFloatParam(objectHandle,
sim.lightfloatparam_const_attenuation) // retval_1 = 0.25 - It's OK.
retval_2 = sim.setObjectFloatParam(objectHandle,
sim.lightfloatparam_const_attenuation, 0.30) // retval_2 = 1 - It's OK
return code.
retval_3 = sim.getObjectFloatParam(objectHandle,
sim.lightfloatparam_const_attenuation) // retval_3 = 0.0 - It's not OK.
Can you please consider this case and answer me - do I something wrong or
it is CoppeliaSim problem? Thank you in advance.
API function sim.setObjectFloatParam() doesn't work properly with light object.
-
- Posts: 1
- Joined: 21 Oct 2022, 13:08
Re: API function sim.setObjectFloatParam() doesn't work properly with light object.
Hello Andrey,
you are prefectly right, there is a bug there. Thanks for mentioning this.
There is unfortunately no workaround in CoppeliaSim V4.4 rev0. But as soon as a new revision or version comes out, that will be corrected.
Cheers
you are prefectly right, there is a bug there. Thanks for mentioning this.
There is unfortunately no workaround in CoppeliaSim V4.4 rev0. But as soon as a new revision or version comes out, that will be corrected.
Cheers