Examples of adjustVelocity()


Examples of net.phys2d.raw.Body.adjustVelocity()

    if (c == ' ') {
      Body body2 = new Body("Mover1", new Box(40.0f, 40.0f), 300.0f);
      body2.setPosition(-50, (float) (((Math.random() * 50) + 150)));
      world.add(body2);
      body2.adjustAngularVelocity(1);
      body2.adjustVelocity(new Vector2f(200,(float) (Math.random() * 200)));
    }
  }
 
  /**
   * @see net.phys2d.raw.test.AbstractDemo#init(net.phys2d.raw.World)
View Full Code Here

Examples of net.phys2d.raw.Body.adjustVelocity()

    if (c == ' ') {
      Body body2 = new Body("Mover1", new Circle(20), 300.0f);
      body2.setPosition(-50, (float) (((Math.random() * 50) + 150)));
      world.add(body2);
      body2.adjustAngularVelocity(1);
      body2.adjustVelocity(new Vector2f(200,(float) (Math.random() * 200)));
    }
  }
 
  /**
   * @see net.phys2d.raw.test.AbstractDemo#init(net.phys2d.raw.World)
View Full Code Here

Examples of net.phys2d.raw.Body.adjustVelocity()

    world.add(body1);
   
    Body body2 = new Body("Cue", new Circle(20.0f),1);
    //Body body2 = new Body("Cue", new Box(40.0f,40.0f),1);
    body2.setPosition(250,0);
    body2.adjustVelocity(new Vector2f(0,100));
    body2.setRestitution(1.0f);
    body2.setFriction(0);
    world.add(body2);
  }
 
View Full Code Here

Examples of net.phys2d.raw.Body.adjustVelocity()

    b.setDamping(0.002f);
    b.setFriction(10);
    b.setRotation(angle);
    // b.setForce(10000f*TrigLUT.cosDeg(angle),
    // 10000f*TrigLUT.sinDeg(angle));
    b.adjustVelocity(new Vector2f(1000f * TrigLUT.cosDeg(angle), 1000f * TrigLUT.sinDeg(angle)));

    // b.setDensity(100);
    // b.setFriction(1.1f);
    // b.setDamping(0.002f);
    // b.setRestitution(0);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.