Exemplo n.º 1
0
 public PhysicsState(DesiredVector3 location, DesiredVector3 velocity, DesiredRotator rotation, DesiredVector3 angularVelocity)
 {
     Location        = location;
     Velocity        = velocity;
     Rotation        = rotation;
     AngularVelocity = angularVelocity;
 }
Exemplo n.º 2
0
        public PhysicsState(Physics physics)
        {
            if (physics.Location.HasValue)
            {
                Location = new DesiredVector3(physics.Location.Value);
            }

            if (physics.Velocity.HasValue)
            {
                Velocity = new DesiredVector3(physics.Velocity.Value);
            }

            if (physics.Rotation.HasValue)
            {
                Rotation = new DesiredRotator(physics.Rotation.Value);
            }

            if (physics.AngularVelocity.HasValue)
            {
                AngularVelocity = new DesiredVector3(physics.AngularVelocity.Value);
            }
        }