BorisBogaerts / CoppeliaSim-VR-Toolbox

This repository contains the code to experience CoppeliaSim in VR
https://www.youtube.com/watch?v=yMydjviF7yg
BSD 3-Clause "New" or "Revised" License
35 stars 18 forks source link

sim.setModelProperty is not being respected by VR-Toolbox #12

Closed lshachar closed 3 years ago

lshachar commented 3 years ago

Hi, This isn't a big problem, still I wanted to drop you a line. In my code I tried using sim.setModelProperty(objHandle, sim.modelproperty_not_visible), which works in CoppeliaSim, but does not affect Vr-Toolbox.

(I didn't check the behavior of other model properties)

This isn't a big problem because layers could still be used to show/hide objects during simulation.

edit 1: I noticed simSetObjectInt32Parameter(objHandle, sim.objintparam_visibility_layer,0) also has no effect, so it seems I must resort to hiding layers during simulation. edit 2: There's no way to hide an entire layer from within a script, like how the layer selection dialog box works. Which means there isn't a way (Or I can't find such a way) to hide objects during simulation in VR toolbox. So this bug isn't so small after all.

BorisBogaerts commented 3 years ago

Yeah the toolbox does not read visibility flags. Not many model properties are read by the toolbox, that would be too slow.

I know that in the past I have hidden layers from within a script, the same way the dialog works. So it should be possible.