December 16, 20169 yr Hey, I am working on a middle mouse button camera rotation class, I have been able to calculate the required camera yaw angle to get the entity into the gameview however I am having troubles calculating the pitch angle. I need a function that can return me the local 'grid' Z position of an entity, just like getCamera().getZ() does. I've noticed that entities have getGridX() and getGridY() functionality, but I couldn't find anything that returns the Z value (Unless its always the same as position.getZ() Best case scenario would be finding Z position relative to my player (or camera) Edited December 16, 20169 yr by Abuse
December 16, 20169 yr Author Maybe Position#getTileHeight() and Entity#getHeight() Unfortunately getTileHeight always returns 0, and getHeight returns the model height
December 16, 20169 yr Unfortunately getTileHeight always returns 0, and getHeight returns the model height Try the getTileHeight() in GraphicUtilities class, that one should not return 0. Add the model height to that and you got the top of the entity.
December 16, 20169 yr Author Try the getTileHeight() in GraphicUtilities class, that one should not return 0. Add the model height to that and you got the top of the entity. Awesome, exactly what I was looking for
Create an account or sign in to comment