Hello I would like to ask if anyone could help me. I have written a helper script in python to display a given object (in the simulation I need to display one object at a given time) I would be glad if someone could advise me what I need to add to the script to make the object remain invisible after it is rendered. Alternatively, if someone could advise me how to write a script to make a given object invisible. Thank you in advance and sorry for my script if not incorrect, but I don’t know much python programming
Hello, 98.
It looks like your code should allow you to make the Block disappear when you stop playback and also make the Block appear when playback starts, I didn’t quite understand what part of it you were having trouble with, if you could please elaborate on your problem.
By the way you seem to have changed the name of the function, it should be sim.OnStartStop = showBox instead of sim.OnStartStop = showBlock.
Hi Bad thank you for your reply. I am sending an example of my problem. My problem is when the robot gets to a certain position ( in the robot program) I need the object to be displayed ( my example cube) and when I reset the simulation to make the cube disappear.
Thank you for your help. Untitled.vcmx (2.5 MB)
It looks like there was some error in saving your file that caused the component to not show up successfully.
Please make sure that Include Components is selected in your save options.
My task is : To make a given object appear (for example a cube) when the robot reaches a certain position. My solution is : I have written a script which should work so that when I call it in the program the given object (for example a cube) will be displayed and when I turn off the simulation or give a reset the given object (cube) will disappear.
I made a little demo that should fit your criteria (sorry, your file wasn’t finished uploading when I did it), and I’ll check out your newly posted file in the meantime. Visible.vcmx (567.1 KB)