Forum rules - please read before posting.

Switch camera through script?

edited August 2018 in Technical Q&A
Hi,
I wondered if it was possible to switch camera through script?
Doesn't need a crossfade or anything, just a simple switch. I looked in the scripting manual and found this:
AC.MainCamera.SetGameCamera(NewCam,2,Linear,null,false);
But it just gives me this "An object reference is required to access non-static member" 
So I must've missed something...

Thanks!

Comments

  • The error is telling you the problem: SetGameCamera is not a static function, so you need to refer to the actual MainCamera component, not the MainCamera script.

    AC.KickStarter.SetGameCamera (NewCam, 2f);
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.