Created
July 24, 2015 14:18
-
-
Save TheXFactor117/88eea3b6378bcd3b0a1f to your computer and use it in GitHub Desktop.
Re-sizing Entities
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) | |
{ | |
super.render(entity, f, f1, f2, f3, f4, f5); | |
float scaleFactor = 0.4F; // determines the scale of the entity. Mess with this to find the right size. | |
GL11.glPushMatrix(); | |
GL11.glTranslatef(0.0F, 1.5F - 1.5F * scaleFactor, 0.0F); | |
GL11.glScalef(scaleFactor, scaleFactor, scaleFactor); | |
// render code | |
GL11.glPopMatrix(); // Don't forget to pop the matrix afterwards. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment