wiki.sine.space | sinespace

Scripting/SVirtualCamera

From wiki.sine.space
Revision as of 04:06, 13 October 2021 by Voidtech (Talk | contribs)

Jump to: navigation, search

Properties

Enabled

bool Enabled {get; set;}

Is this virtual camera enabled?

local camera=Space.Host.GetReference("Camera").VirtualCamera
Space.Log(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)


FieldOfView

float FieldOfView {get; set;}

Field of view of this virtual camera.

local camera=Space.Host.GetReference("Camera").VirtualCamera
Space.Log(camera.FieldOfView)


Dutch

float Dutch {get; set;}

Dutch of view of this virtual camera. In degrees.

local camera=Space.Host.GetReference("Camera").VirtualCamera
Space.Log(camera.Dutch)


NearClip

float NearClip {get; set;}

The near clip plane of this virtual camera.

local camera=Space.Host.GetReference("Camera").VirtualCamera
Space.Log(camera.NearClip)


FarClip

float FarClip {get; set;}

The far clip plane of this virtual camera.

local camera=Space.Host.GetReference("Camera").VirtualCamera
Space.Log(camera.FarClip)


OrthographicSize

float OrthographicSize {get; set;}

The orthographic size of this virtual camera.

local camera=Space.Host.GetReference("Camera").VirtualCamera
Space.Log(camera.OrthographicSize)


Priority

int Priority {get; set;}

The priority of this virtual camera. Higher priority cameras will be used over lower priority cameras when conflicted.

local camera=Space.Host.GetReference("Camera").VirtualCamera
Space.Log(camera.Priority)


Follow

SGameObject Follow {get; set;}

The object that this virtual camera should be following.

local camera=Space.Host.GetReference("Camera").VirtualCamera
Space.Log(camera.Follow.Name)


LookAt

SGameObject LookAt {get; set;}

The object that this virtual camera should be looking at.

local camera=Space.Host.GetReference("Camera").VirtualCamera
Space.Log(camera.LookAt.Name)