Esempio n. 1
0
 public void SetPosition(Vector3d pos)
 {
     if (_physics == null)
     {
         if (Target != null)
         {
             Target.transform.Position = pos;
         }
         return;
     }
     _physics.SetPosition(pos);
 }
Esempio n. 2
0
        //either transform or physics
        public void SetPosition(Vector3d p)
        {
            MPhysicsObject po = (MPhysicsObject)FindModuleByType(EType.PhysicsObject);

            if (po != null)
            {
                po.SetPosition(p);
            }
            else
            {
                transform.Position = p;
            }
        }
Esempio n. 3
0
        //either transform or physics
        public void SetPosition(Vector3d p)
        {
            //a phyics module may be added at any time, so we need to query for it
            MPhysicsObject po = GetPhysics();

            if (po != null)
            {
                po.SetPosition(p);
            }
            else
            {
                transform.Position = p;
            }
        }