m (Voidtech moved page Scripting/VirtualCamera to Scripting/SVirtualCamera: Incorrect class name) |
|||
Line 3: | Line 3: | ||
{{ScriptFunction|bool|Enabled|{get; set;}|Is this virtual camera enabled?|5= | {{ScriptFunction|bool|Enabled|{get; set;}|Is this virtual camera enabled?|5= | ||
local camera=Space.Host.GetReference("Camera").VirtualCamera<br> | local camera=Space.Host.GetReference("Camera").VirtualCamera<br> | ||
− | Space.Log(camera.Enabled) | + | Space.Log(camera.Enabled)|6=<pre>--clicking this object will Enable/Disable it's Virtual Camera component |
+ | thisGameObject = Space.Host.ExecutingObject | ||
+ | component = thisGameObject.VirtualCamera | ||
+ | |||
+ | OnClick = function() | ||
+ | component.Enabled = not component.Enabled | ||
+ | end | ||
+ | |||
+ | |||
+ | thisGameObject.AddClickable() | ||
+ | thisGameObject.Clickable.OnClick(OnClick)</pre> | ||
}} | }} | ||
Is this virtual camera enabled?
--clicking this object will Enable/Disable it's Virtual Camera component thisGameObject = Space.Host.ExecutingObject component = thisGameObject.VirtualCamera OnClick = function() component.Enabled = not component.Enabled end thisGameObject.AddClickable() thisGameObject.Clickable.OnClick(OnClick)
Field of view of this virtual camera.
Dutch of view of this virtual camera. In degrees.
The near clip plane of this virtual camera.
The far clip plane of this virtual camera.
The orthographic size of this virtual camera.
The priority of this virtual camera. Higher priority cameras will be used over lower priority cameras when conflicted.
The object that this virtual camera should be following.
The object that this virtual camera should be looking at.
|