Posted August 12, 20169 yr This is what my IBakedModel::handlePerspective() method looks like: @Override public Pair<? extends IBakedModel, Matrix4f> handlePerspective(ItemCameraTransforms.TransformType cameraTransformType) { switch (cameraTransformType) { case THIRD_PERSON_RIGHT_HAND: Matrix4f transform = new Matrix4f(); transform.setIdentity(); float degree90 = (float)(Math.PI/2); transform.mul(0.1F); transform.rotX(degree90); transform.rotZ(degree90); transform.rotY(degree90); return Pair.of(this, transform); } return Pair.of(this, null); } The model rotates correctly but its size doesn't change. What am I doing wrong?
August 12, 20169 yr Author That's what I was thinking aswell, but it doesn't seem to make a difference: Matrix4f scale = new Matrix4f( 0.1F, 0, 0, 0, 0, 0.1F, 0, 0, 0, 0, 0.1F, 0, 0, 0, 0, 1 ); transform.mul(scale); Still the same size
August 12, 20169 yr Author Ok. I found the problem. The rot methods in Matrix4f set m00 and m33 (first element in first row, last element in last row) to 1. I had to first rotate it and then multiply it by 0.1 and finally set m33 back to 1.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.