Page 1 of 1

setCamera Question

Posted: Sat Aug 06, 2016 11:38 am
by akroma222
Hi All,
just wondering about how setCamera works... (how to correctly reference other cameras too?)

Ive checked this thread .... ....and seen GameMode:setCamera(nil) will return the camera to the party view point... but no luck :cry:

Ive just added a Camera Component to a (light) Object
SpoilerShow

Code: Select all

{
			class = "Camera",
			name = "camera",
			--fov = 100,
			--nearClip = 0.1,
			--farClip = 100,
			onInit = function(self)
				GameMode.setCamera(self)
			end,
			--onUpdate = function(self)
				--print("cam update")
			--end,
		},
The onInit works fine, changed the camera... but cant change back??

Re: setCamera Question

Posted: Sat Aug 06, 2016 11:40 am
by akroma222
Also, do we NEED to do things in the update Hook?? (Ive checked how the main menu camera works... )

Re: setCamera Question

Posted: Sat Aug 06, 2016 5:12 pm
by Isaac
A good thread on the subject: viewtopic.php?f=22&t=8494

[Actually... just a good single post :)]

Re: setCamera Question

Posted: Mon Aug 08, 2016 1:09 pm
by akroma222
Ahhh Indeed it is!! I had not seen this thread before
Thankyou Isaac :D