Jump to content

Voldemort127

Members
  • Posts

    4
  • Joined

  • Last visited

Everything posted by Voldemort127

  1. Problem solved! I made a separate method in the model class, that renders the pupil separately. This is my render code: EntityPlayer ep = Minecraft.getMinecraft().thePlayer; float eyeX = Math.max(Math.min((float) ((ac1_rot == 0 ? tee.xCoord : (ac1_rot == 90 ? -tee.zCoord - 1.0F : (ac1_rot == 180 ? -tee.xCoord - 1.0F : tee.zCoord))) + 0.5F - (ac1_rot == 0 ? ep.posX : (ac1_rot == 90 ? -ep.posZ : (ac1_rot == 180 ? -ep.posX : ep.posZ)))), 1.0F), -1.0F) * 1.8F; float eyeY = Math.max(Math.min((float) ((tee.yCoord) + 0.5F - (ep.posY)), 1.0F), -1.0F) * 1.8F; this.model.renderModel(0.0625F); GL11.glTranslatef(eyeX / 12.0F, eyeY / 12.0F, 0.0F); this.model.renderPupil(0.0625F); Now, all the eyes are staring at me
  2. Okay, I've moved the calculations in the TESR, but it is still buggy if I place more eyes. I've noticed something while moving around in the front of the blocks: The eye on the left looks exactly where the one on the right should look at and vice versa.
  3. How can I fix it? And what did I do wrong with the eye movement thingy?
  4. Hi, I am working with a block that has a custom model. This block is an eye that always looks at the player. If I place this block somewhere, it will look at me, so it works, but if I place more than one block, both of them will go crazy. If the game only renders one of them (ex. the other eye is behind me) it works without any problem. So my question is how can I make the eye movement per block so if I place more than one eyes next to each other, they would both look at me? Pics and code files below. If only one block is on the screen, it will look at me: If there are more than one eye blocks on the screen, none of them will look at me: (left side of the pic) This is my TileEntity code: https://gist.github.com/Voldemort127/4c2e1d86fb3f732e2df1 Render code: https://gist.github.com/Voldemort127/46f428cc65f97f7a6c54 Block code: https://gist.github.com/Voldemort127/3d2346d00d9ac698e142 Pls tell me if I forgot something
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.