Ejemplo n.º 1
0
        private Vector3 GetGravityVector3(ITraceable a0, ITraceable a1, int sampleTime)
        {
            float   distance            = Vector3.Distance(_orbitPoints[a0][sampleTime], _orbitPoints[a1][sampleTime]);
            Vector3 normalizedDirection = (_orbitPoints[a1][sampleTime] - _orbitPoints[a0][sampleTime]).normalized;

            return(CalculateGravityModulus(a0.GetMass(), a1.GetMass(), distance) * normalizedDirection);
        }