Пример #1
0
    // Use this for initialization
    void Start()
    {
        rbody = GetComponent <Rigidbody>();
        InitialConditions ic = InitialConditions.Instance();

        rbody.velocity     = new Vector3(0, -ic.v, 0);
        transform.position = new Vector3(ic.r, 0, 0);

        Debug.LogFormat("Timestep={0}", Time.fixedDeltaTime);
    }
Пример #2
0
    // Use this for initialization
    void Start()
    {
        InitialConditions ic = InitialConditions.Instance();

        v = new float[] { ic.v, 0, 0 };
        r = new float[] { 0, -ic.r, 0 };
        a = new float[3];

        mass  = centralBody.mass;
        dt    = ic.dt;
        speed = ic.GetSpeed();
    }
Пример #3
0
    // Use this for initialization
    void Start()
    {
        // precalc acceleration
        InitialConditions ic = InitialConditions.Instance();

        v = new float[] { ic.v, 0, 0 };
        transform.position = new Vector3(0, ic.r, 0);
        r = new float[] { 0, ic.r, 0 };
        a = new float[3];
        CalcAcceleration();
        mass = centralBody.mass;

        speed = ic.GetSpeed();
        dt    = ic.dt;
    }