Package com.badlogic.gdx.math

Examples of com.badlogic.gdx.math.Vector2.mul()


  }

  public void goTowardsOrAway(Vector2 targetPos, boolean isAway) {
    Vector2 target_direction = targetPos.cpy().sub(body.getWorldCenter().cpy());
    if (isAway) {
      target_direction.mul(-1);
    }
   
    if (body.getWorldVector(new Vector2(0, 1f)).cpy().crs(target_direction) > 0) {
      turn(1);
    } else {
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.