Skip to content

Commit

Permalink
Merge branch 'feature/joml-kinematic-character-mover' of github.com:p…
Browse files Browse the repository at this point in the history
…ollend/Terasology into feature/joml-kinematic-character-mover
  • Loading branch information
pollend committed Apr 29, 2020
2 parents 74e8615 + 8ae609a commit d9bfa0c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public void setToState(EntityRef entity, CharacterStateEvent state) {
setPhysicsLocation(entity, JomlUtil.from(state.getPosition()));

// set the pitch to the character's gaze entity
Quaternionf rotation = new Quaternionf().rotationYXZ(0f, TeraMath.DEG_TO_RAD * state.getPitch(), 0f);
Quaternionf rotation = new Quaternionf().rotationX(TeraMath.DEG_TO_RAD * state.getPitch());
EntityRef gazeEntity = GazeAuthoritySystem.getGazeEntityForCharacter(entity);
if (!gazeEntity.equals(entity)) {
// Only set the gaze entity rotation if it is not the same as the main entity.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,7 @@ private void climb(final CharacterStateEvent state, CharacterMoveInputEvent inpu
float leftOrRight = tmp.x;
float plusOrMinus = (leftOrRight < 0f ? -1.0f : 1.0f) * (climbDir3i.x != 0 ? -1.0f : 1.0f);
if (jumpOrCrouchActive) {
rotation.rotationYXZ(TeraMath.DEG_TO_RAD * state.getYaw(), 0, 0);
rotation.rotationY(TeraMath.DEG_TO_RAD * state.getYaw());
} else {
rotation.rotationYXZ(TeraMath.DEG_TO_RAD * input.getYaw(), 0f,
TeraMath.DEG_TO_RAD * rollAmount * plusOrMinus);
Expand Down

0 comments on commit d9bfa0c

Please sign in to comment.