Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: amaranth on September 28, 2012, 07:56:39 PM

Title: How to access camera properties?
Post by: amaranth on September 28, 2012, 07:56:39 PM
I have a camera with a few properties I want to tweak, but I'm not sure how to do this. I tried saving the camera component as an object variable, but I don't see the camera in the object list. I'm not sure how to get the camera properties.

A few of the camera properties that I'm trying to access are:
-Clear Flags
-Background
-Culling Mask

Any ideas?
Title: Re: How to access camera properties?
Post by: kiriri on September 29, 2012, 03:33:40 AM
I don't think this is possible, since the object variables (such as camera info etc) have not been integrated. They are just there without doing a thing, afaik. In your case you might create a number of prefabs of the camera with different attribute and switch them if needed. I personally would create a prefab though, which has the fsm directly on the camera. That way, you can simply drag the actual camera component in as a set property action and once the object is instanced in the game, the FSM will no longer target the prefab, but the actual instance itself.
Title: Re: How to access camera properties?
Post by: amaranth on September 29, 2012, 06:44:18 PM
Figured that might be the case. I created an action to capture the background color, which was most important.
Title: Re: How to access camera properties?
Post by: kiriri on October 08, 2012, 08:21:42 AM
Sorry amaranth, it does work and here's the solution (different example but same principle):
http://hutonggames.com/playmakerforum/index.php?topic=2396.0
Title: Re: How to access camera properties?
Post by: amaranth on October 08, 2012, 03:45:10 PM
Sorry? This is awesome! Going to see if I can get my camera to show up with the info in your new post. :)