Beispiel #1
0
    public float LandOnPlanet(Planet planet)
    {
        Vector3 direction = (this.transform.position - planet.transform.position).normalized;
        float   angle     = Mathf.Acos(direction.x);

        this.SetVelocity(0f);
        this.SetAngle(angle);
        this.SetPlanet(planet.gameObject);
        planet.AddEntity(this);
        return(angle);
    }