Created
September 24, 2012 10:02
-
-
Save BobTheBuilderBot/3775248 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Override | |
| public void update(float tpf) { | |
| if(action.getSource() instanceof PlayerCharacter) { | |
| PlayerCharacter character = (PlayerCharacter) action.getSource(); | |
| Vector3f direction = action.getTargetPosition().divide(action.getTargetPosition()).setY(0); | |
| character.getControl().setWalkDirection(direction.multLocal(character.getVelocity())); | |
| } | |
| if(action.getTargetPosition() == action.getSource().getPosition()) { | |
| actionHandler.onFinished(action); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment