// Use this for initialization void Start() { sceneController = GameObject.Find("SceneController"); //To keep various variables up to date controlScript = (VerletV3)sceneController.GetComponent("VerletV3"); position = V3toV3D(inputPosition); //Convert input floats to doubles initialVelocity = V3toV3D(inputVelocity); //Ditto above initialVelocity = initialVelocity * 0.00001157407407 * controlScript.timeStep; //Unit conversion of Velocity from AU/Day to AU/Sec then multiplys by timestep previousPosition = position - initialVelocity; //Calculates previous position based on initial velocity }
// Use this for initialization void Start() { ControlScript = (VerletV3)this.GetComponent("VerletV3"); buttons[0].OnPress += teleportToSol; buttons[1].OnPress += teleportToMercury; buttons[2].OnPress += teleportToVenus; buttons[3].OnPress += teleportToEarth; buttons[4].OnPress += teleportToMars; buttons[5].OnPress += teleportToJupiter; buttons[6].OnPress += teleportToSaturn; buttons[7].OnPress += teleportToUranus; buttons[8].OnPress += teleportToNeptune; buttons[9].OnPress += teleportToPluto; buttons[10].OnPress += teleportToMoon; }
// Use this for initialization private void Start() { ControlScript = (VerletV3)GetComponent("VerletV3"); }