Posted January 20, 20196 yr This might be an obvious question but I just started to understand how models work. How do I rotate a model during onUpdate on both Yaw and Pitch angles? Basically the player is on the Entity and I want the entity to look where the passenger is looking at. The current code works for Yaw angle only. I can see the pitch changes on the entity (Blue line on debug) but the model it self does not rotate. @Override public void onUpdate() { super.onUpdate(); if (this.canPassengerSteer() && getControllingPassenger() != null) { Entity entity = this.getControllingPassenger(); setRotation(entity.rotationYaw, entity.rotationPitch); } } Edited January 20, 20196 yr by De Joker
January 20, 20196 yr Author Solution for future viewers In the render class on doRender add this: GlStateManager.rotate(entity.rotationPitch, 1, 0, 0);
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.