List of usage examples for com.badlogic.gdx.ai.steer SteeringAcceleration SteeringAcceleration
public SteeringAcceleration(T linear)
From source file:AITest.Box2DSteeringEntity.java
public Box2DSteeringEntity(Body body, float boundingRadius) { this.body = body; this.boundingRadius = boundingRadius; this.maxAngularAcceleration = 5; this.maxAngularSpeed = 5; this.maxLinearSpeed = 5; this.maxLinearAcceleration = 500; this.tagged = false; this.steeringOutput = new SteeringAcceleration<Vector2>(new Vector2()); this.body.setUserData(this); }
From source file:com.mygdx.entities.DynamicEntities.SteerableEntity.java
public SteerableEntity(Vector2 pos, float w, float h) { super(pos, w, h); bd.position.set(pos.x / PPM, pos.y / PPM); bd.type = BodyDef.BodyType.DynamicBody; cshape.setRadius(width / PPM);/*from w ww .j a v a 2 s. co m*/ shape.setAsBox(width / PPM, height / PPM); fd.shape = cshape; userdata = "steerable_" + id; this.maxLinearSpeed = 500f; this.maxLinearAcceleration = 500f; this.maxAngularSpeed = 30f; this.maxAngularAcceleration = 5f; boundingRadius = cshape.getRadius(); this.tagged = false; this.steeringOutput = new SteeringAcceleration<Vector2>(new Vector2()); }