API function to change object visibility

Typically: "How do I... ", "How can I... " questions
Post Reply
BDG
Posts: 4
Joined: 30 Jul 2015, 03:07

API function to change object visibility

Post by BDG » 18 Aug 2015, 07:53

I am creating a new pure shape and want to change its camera visibility. I know this is under the common tab but I'm having trouble finding a way for a script to change this.

thanks

coppelia
Site Admin
Posts: 6740
Joined: 14 Dec 2012, 00:25

Re: API function to change object visibility

Post by coppelia » 18 Aug 2015, 11:43

Hello,

do you mean the camera visibility, or the vision sensor visibility? This is not the same.

For camera visibility, you can use: simSetObjectIntParameter(objectHandle,10,visibilityLayers)

For vision sensor visibility, you will have to play with the renderable flag. You can use: simSetObjectSpecialProperty

Cheers

spaceman
Posts: 6
Joined: 09 May 2018, 15:18

Re: API function to change object visibility

Post by spaceman » 24 May 2018, 11:34

Hello,

Is it possible to make an object invisible to vision sensor using the python remote API?

Thanks,
Spaceman

coppelia
Site Admin
Posts: 6740
Joined: 14 Dec 2012, 00:25

Re: API function to change object visibility

Post by coppelia » 24 May 2018, 12:51

Hello,

not directly. You will have to use sim.setObjectSpecialProperty in a V-REP script function, and call that script function with simxCallScriptFunction.

Cheers

Post Reply