Posted September 5, 201411 yr Hello all, I am currently creating a mod that has guns and would like to be able to create a sniper which has a sight. However, I don't know how to do this or start with it. I have created the gun and the buttons to bring up the scope are done. I would like the know how to be able to bring up a gui (like the pumpkin? not sure if this is the best way around it) with the scope textures and also zoom the camera in. How would I do this, I appreciate all help. Thanks
September 6, 201411 yr http://www.minecraftforge.net/forum/index.php/topic,7773.msg39517.html#msg39517 <------ not sure if out dated, look around the classes For the overlay, you could use the RenderGameOverlayEvent.Pre event and check for the type. Kain
September 6, 201411 yr Use FOVUpdateEvent - you can see my implementation here, which is flexible enough to allow different levels of zoom. http://i.imgur.com/NdrFdld.png[/img]
September 6, 201411 yr For zoom you can use FOVUpdateEvent or set the value of private variable EntityRenderer.cameraZoom using reflection.
September 6, 201411 yr Author Thanks for all the help everyone I have got the zoom working now, but I'm not too sure on the overlay. I got part of it working however it didn't fit the screen correctly and was not the correct scale etc Just fixed it, all working now, thanks for the help
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.