Commit 7ec45914 authored by David Gilbert's avatar David Gilbert

Fixed moon radius

parent f179d7ac
......@@ -658,7 +658,8 @@ Entity OrbitalSimulationSystem::addPlanet(Transform::Handle sun, std::string n,
auto moonTransform = moon.assign<Transform>();
moonTransform->parent = planetTransform;
moon.assign<Drawable>(defaultGeom, moonMat, 0, m_renderer->getRenderPassId("Main"_sh));
auto moonComponent = moon.assign<Planet>("Moon", 0.000000036939686, 0.003505316091954, 0.205633, 0.08, 0.0898041713, 5.4583095414, 1.671072474, 0 );
double moonRad = 0.002495833333333;
auto moonComponent = moon.assign<Planet>("Moon", 0.000000036939686, moonRad, 0.205633, 0.08, 0.0898041713, 5.4583095414, 1.671072474, 0 );
// change starting point
//float t = static_cast <float> (rand()) / static_cast <float> (RAND_MAX / 10.0f);
......@@ -666,7 +667,7 @@ Entity OrbitalSimulationSystem::addPlanet(Transform::Handle sun, std::string n,
moonPos = glm::dvec3(AUToWorld(moonPos.x), AUToWorld(moonPos.y), AUToWorld(moonPos.z));
moonTransform->position = moonPos;
moonTransform->scale = glm::dvec3(solarToWorld(r*0.5f), solarToWorld(r*0.5f), solarToWorld(r*0.5f));
moonTransform->scale = glm::dvec3(solarToWorld(moonRad), solarToWorld(moonRad), solarToWorld(moonRad));
}
// Add the transformation matrixes to calculate the trajectory from a standard circle:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment