[Closed] GetAltitudeAzimuth
I am trying to print the altitude and azimuth in the listener but don’t know how to call this function.
<void>GetAltitudeAzimuth <time>time <&float>altitude <&float>azimuth
There is no other documentation I can find on this. Can someone help me out?
Max 2012 Help
<void>GetAltitudeAzimuth <time>time <&float>altitude <&float>azimuth altitude is In and Out parameter azimuth is In and Out parameter Returns the altitude and azimuth values corresponding to the time given as first argument into the by-reference variables given by the second and third argument.
ok… it’s a method of IDaylightSystem interface. so to get it works you have to call:
altitude = azimuth = 0
<DaylightAssemblyHead>.GetAltitudeAzimuth currenttime &altitude &azimuth
[size=2][size=2]
[/size][/size]where <DaylightAssemblyHead> is daylight system group head
Thank you Denis. I did that but it just returns “OK”
theInt = DaylightSystemFactory2.Create sunClass:mr_Sun skyClass:mr_Sky
--> <MixinInterface:IDaylightSystem>
theInt.getSun()
--> mr Sun
theInt.getSky()
--> mr Sky
theInt = DaylightSystemFactory2.Create sunClass:DirectionalLight
--> <MixinInterface:IDaylightSystem>
theInt.getSun()
--> Free Directional Light
theInt.getSky()
--> Skylight
altitude = azimuth = 0.0
aa = $Daylight001.GetAltitudeAzimuth currenttime &altitude &azimuth
theint
for anyone who might be doing this the azimuth and altitude are returned in radians which need to be converted to degrees.
az = ((180*azimuth)/pi)