Пример #1
0
    void Update()
    {
        Quaternion q = new Quaternion();

        q.SetFromToRotation(Vector3.up, DVector3.ToUnity(Body.Omega));

        Omega.transform.localRotation = q;
        Omega.SetLength((float)Body.Omega.magnitude / MasterScale);

        AngularVelocityTrail.transform.localPosition = DVector3.ToUnity(Body.Omega / MasterScale);

        InertiaEllipsoid.transform.rotation = DQuaternion.ToUnity(Body.Orientation);

        AngularVelocityTrail.enabled = true;
    }
Пример #2
0
 // Update is called once per frame
 void Update()
 {
     transform.rotation = DQuaternion.ToUnity(Orientation);
 }