Start a new topic

Switchable Cameras during Simulation

Greetings everyone!

I am working on a remote camera display for crane simulation. It will display 4 perspective cameras in one monitor. I believe that I can`t switch the cameras once it was saved in .vxc file. So my option is to create a script in Editor to allow an active camera to switch its views.


I am new on this programming. Do someone know how to complete this script for changing cameras? Kindly guide me on this.





The basic logic of the script looks like it should work fine. When I try running your attached file, there is a syntax error:

  File "<string>", line 11

def pre_step(self):


IndentationError: expected an indented block

You have all the code in the on_remove_from _universe function commented, so the function is empty and expects some code. If you just add a "pass" statement at the end of the function, it should work. 


Hi Martin,

I don`t notice this one . Thank you for the help!

After adding pass statement, another syntax error displays - it talks about the getValue().

I replace it with "value" and it works.

Thank you for the guidance. I appreciate it.



Login to post a comment