/
Changing Viewpoints

Changing Viewpoints

When you have multiple viewpoints in your environments, you can toggle between them using keyboard commands or in-simulation interactions. For this tutorial, we will focus on changing viewpoints with keyboard commands using the course from the “Using Multiple Viewpoints” tutorial.

If you did not already check the “Using Multiple Viewpoints” tutorial out, I recommend you do so before continuing with this tutorial.

Opening Courses

To open a saved course from a previous use, click on “File” in the menu bar and then click on “Open Course” from the drop-down menu. This will open a window showing your saved courses from within your “Courses” folder.

Look for the .Json file where you saved your course for the “Using Multiple Viewpoints” tutorial. Once you find it, click on it and finally click on “Open” from the window to open course.

Look around the environment to make sure you have all 3 viewpoints (cameras) set up.

Tutorial_11_A.png

Check which viewpoint the simulation would start with by going to object transform from within the side panel. Once there, make sure you have your desired viewpoint in the “Starting Viewpoint” box. I have selected “Prone” as my starting viewpoint.

Tutorial_11_B.png

Assigning Key Controls

You can assign any/all behaviors to an object such as going to different stages or changing viewports by using object behaviors within the side panel. Additionally, you can trigger any of these behaviors by pressing assigned keys from your keyboard.

To assign a key to a behavior, click on “Object Behaviors” from within the side panel. We want to start by adding a key press trigger to the “J” key to make the current viewpoint the “Standing” viewpoint. (You can use any key that is not already set up as a shortcut)

Start by clicking on “Add” for triggers and make sure the process trigger is set to “Continuous” so that you could trigger the viewpoint change at any point during the simulation.

To assign the “J” key to this behavior, click on the trigger box where it says “None.” This will make a drop-down menu appear. Click on “Key Press”, then click on the box that says, “<empty>,” and press the “J” into it.

Keep the order as sequential, click on “Add” for actions and click on the action box that says “None.” This will make yet another down menu appear, this time for actions. Look for “Change Waypoint” and then click on it to select it.

Finally, to make the new viewpoint the “Standing” viewpoint, click the “New Viewpoint” box and select “Standing.” Set the “Method” to “Travel” for smooth transitions between viewpoints.

Your object behaviors settings should look like below.

 

Tutorial_11_C.png

To change into the other viewports, add other triggers with different Key presses and actions to change into the rest of the viewpoints. I have made keys “K” and “L” to go to the “Kneeling” and “Prone” viewpoints respectively.

Add another trigger by clicking on “Add” to the left of “Trigger 1 of 1.” Once clicked, This should update to “Trigger 1 of 2.” Repeat the steps above to assign keys “K” and L” to the “Kneeling” and “Prone” viewpoints respectively.

To test these behaviors in real time, click on “Simulate” in the tool bar and select “Simulate Stage.”

Tutorial_11_D.png

 

Related content