mirror of
https://github.com/Sollace/Unicopia.git
synced 2025-02-17 10:24:23 +01:00
Apply rolling to the player's model when flying
This commit is contained in:
parent
90c89f89c1
commit
8081d4c1a6
1 changed files with 10 additions and 0 deletions
|
@ -73,6 +73,16 @@ public class WorldRenderDelegate {
|
|||
matrices.translate(x, y + owner.getHeight() / 2, z);
|
||||
matrices.multiply(Vec3f.POSITIVE_X.getDegreesQuaternion(roll));
|
||||
matrices.multiply(Vec3f.POSITIVE_Y.getDegreesQuaternion(roll));
|
||||
|
||||
if (pony instanceof Pony) {
|
||||
roll = ((Pony)pony).getCamera().calculateRoll();
|
||||
|
||||
|
||||
matrices.multiply(Vec3f.NEGATIVE_Y.getDegreesQuaternion(yaw));
|
||||
matrices.multiply(Vec3f.POSITIVE_Z.getDegreesQuaternion(roll));
|
||||
matrices.multiply(Vec3f.POSITIVE_Y.getDegreesQuaternion(yaw));
|
||||
}
|
||||
|
||||
matrices.translate(-x, -y - owner.getHeight() / 2, -z);
|
||||
|
||||
if (negative) {
|
||||
|
|
Loading…
Reference in a new issue