Jump to content

Recommended Posts

Posted

These two events look promising:

RenderWorldEvent.Pre

RenderWorldEvent.Post

 

They effectively let you push/pop the OpenGL transform matrix before/after the world is rendered, which is probably what you need.

That is, you'd handle those events like this:

onEvent(RenderWorldEvent.Pre event) {
  glPushMatrix(); // Save the current transform "state" of OpenGL
  // Do whatever OpenGl transforms you need to zoom out
  // For example,
  glTranslatef(100f, 100f, -100f);
}

onEvent(RenderWorldEvent.Post event) {
  glPopMatrix(); // Reset the OpenGL to what it was
}

 

Here's a good event tutorial/reference, in case you need it:

http://jabelarminecraft.blogspot.com/p/minecraft-forge-172-event-handling.html

Posted

...

 

I tried this but the blocks change the localization, not my third person cam :/

--

Nvm, i got it! thx a lot!!!

 

I just change a few in your code

If anyone need help, this is mine code:

@SubscribeEvent
public void onEvent(RenderPlayerEvent.Pre event) {
	GL11.glPushMatrix();
	GL11.glTranslatef(0.0F, -5.0F, 0.0F);
}
@SubscribeEvent
public void onEvent (RenderPlayerEvent.Post event) {
	GL11.glPopMatrix();
}

Posted

You can change the fov with mc.gameSettings.fovSetting = 0F; just change the fov to a large negative number and it will achieve the effect i think you want

Thats really not a good option because not only dose it not do what he wants (he wants to change the camera position not the fov) but it actually changes the fov setting so you have to find a way to store the current value and restore that value when you are done.

 

That is why forge added FOVUpdateEvent That dose exactly the same thing as changing mc.gameSettings.fovSetting;

I am the author of Draconic Evolution

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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