Questions on Camera's view

Added by Skye Sim 42 days ago

Hi there,

Here's the scenario, hope you guys can help!

I have set up Camera 1, Camera 2, Cube1, Joe-Avatar on the vastpark creator 0.98.

I'm trying to do a View switch from Camera 1 to Camera 2 by clicking on Cube1.
Does the Camera class itself have the methods, or do I have to create a LUA to handle all the view change?

Thanks!


Replies

RE: Questions on Camera's view - Added by Jeremy Massey 41 days ago

Hi Skye,

Skye Sim wrote:

I'm trying to do a View switch from Camera 1 to Camera 2 by clicking on Cube1. Does the Camera class itself have the methods, or do I have to create a LUA to handle all the view change?

This is accomplished via a trigger and LUA script.

I have attached a sample IMML which demonstrates this functionality. Click on the blue box to toggle the document camera. The document camera name can be get or set via:

scene.document.camera

In the attached example, the script first checks to see if the current camera is Camera-1, and if so it changes to Camera-2. Likewise, if the current camera is Camera-2, it changes to Camera-1.

Let me know if you need any further assistance.

Jeremy

camera-change-example.imml - An example park demonstrating toggling the document camera. (1.5 KB)