/**
  * Sets the location in the physics engine.
  *
  * @param entity The entity to set the location of.
  * @param newPos The new position of the entity.
  */
 private void setPhysicsLocation(EntityRef entity, Vector3f newPos) {
   CharacterCollider collider = physics.getCharacterCollider(entity);
   collider.setLocation(newPos);
 }
Ejemplo n.º 2
0
 /**
  * Sets the location in the physics engine.
  *
  * @param entity The entity to set the location of.
  * @param newPos The new position of the entity.
  */
 private static void setPhysicsLocation(EntityRef entity, Vector3f newPos) {
   PhysicsEngine physics = CoreRegistry.get(PhysicsEngine.class);
   CharacterCollider collider = physics.getCharacterCollider(entity);
   collider.setLocation(newPos);
 }