예제 #1
0
        private RigidBody AddBox(Util.MyMath.Vector3 position, Util.MyMath.Vector3 velocity, Util.MyMath.Vector3 size)
        {
            BoxShape  shape = new BoxShape(size);
            RigidBody body  = new RigidBody(shape);

            world.AddBody(body);
            body.Position             = position;
            body.Material.Restitution = 0.0f;
            body.LinearVelocity       = velocity;
            body.IsActive             = false;
            return(body);
        }
예제 #2
0
 private void MyMove(Util.MyMath.Vector3 vec)
 {
     m_LastSphere.LinearVelocity = vec * 50;
 }