OK!OK!OK! it's bad, illegal, bla, bla, bla, but how change this f...g tide setting ?
Where can I find this function:
const float maxTide=5;
Vector3 sunDir = sun->SunDirection();
Vector3 moonDir = sun->MoonDirection();
Vector3 sunTide = sunDir[1]*sunDir;
Vector3 moonTide = moonDir[1]*moonDir;
float tide01 = (sunTide.Y()+moonTide.Y())*0.5;
float tideAbs =maxTide*tide01;
Note: we are aware the tide formula contains a bug.
Correct should be:
float tide=(fabs(sunTide.Y())+fabs(moonTide.Y())*0.5;