playMaker

Author Topic: Get Rotation and Compare Float  (Read 724 times)

fuzzywobs

  • Playmaker Newbie
  • *
  • Posts: 25
    • View Profile
Get Rotation and Compare Float
« on: November 12, 2015, 11:06:39 AM »
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?

fuzzywobs

  • Playmaker Newbie
  • *
  • Posts: 25
    • View Profile
Re: Get Rotation and Compare Float
« Reply #1 on: November 12, 2015, 11:14:59 AM »
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!