Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: fuzzywobs on November 12, 2015, 01:06:39 PM

Title: Get Rotation and Compare Float
Post by: fuzzywobs on November 12, 2015, 01:06:39 PM
I am trying to build a Day/Night cycle. When the sun goes down I want to change the ambient lighting color and intensity. I've managed to do it a number of silly ways but I always end up having to change loads of variables depending on the speed of the day/night cycle and it's a real pain and inefficient.

The easiest way it should be done is to check if the angle of the directional light, and if it is aiming up (i.e. an angle less than 0) which is night time I can trigger a change in the ambient lighting. If the angle is greater than 0 (i.e pointing down), then the daytime ambient light kicks in.

So my problem is that I have the directional light rotating around X and cannot seem to be able to use Float Compare to check the angle to trigger the event. Any ideas?
Title: Re: Get Rotation and Compare Float
Post by: fuzzywobs on November 12, 2015, 01:14:59 PM
After a bit more digging and trial and error, I used quaterion angles and now it works. I don't understand what I did but it works!