Hello, first of all sorry for my english it is translated by google.
I would like to know what would be the best way to make a change of focus effect on a game camera.
Currently I try to attach a depth of field script on a game camera and switch to another one that would have different focus but apparently this sript only works on the "main camera".
What would be the best way through the action list to effect this effect of changing focus?
Thank you in advance if someone to answer
Comments
In an AC scene, the MainCamera is the only one that does any rendering - all the GameCameras are just "reference" points for the MainCamera to take. Therefore, any effects you want to add to your camera must go on the MainCamera object. For more on this, see the Manual's "Camera effects" chapter.
Each GameCamera, however, does provide a "Depth of field" property that you can configure for each - and this will be read by the MainCamera at runtime. As there are many ways of making use of this value, however, you must rely on a custom script to take it and apply it to your effect script. This can be read through script with:
AC.KickStarter.mainCamera.GetFocalDistance ();
Again, see the Manual chapter for more on this. The most common way of achieving a Depth Of Field effect nowadays, however, is to rely on Unity's own Post Processing Stack asset. An integration script for linking this with AC can be found on the AC wiki here: https://adventure-creator.wikia.com/wiki/Post_processing_depth_of_field