Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

I'd like to know how to change the view of the camera. I've done some digging around in the MC code, and I found orientCamera in EntityRenderer, which deals with 1st/3rd person view etc. However, I'm not sure exactly how all the camera stuff works, and I don't know how to implement it into a mod. There was a thread on something similar in the past, but the final solution was very unclear and I couldn't figure out how to implement it. Another good resource might me iChun's Sync mod, with the animation when you switch shells, but I can't find where he actually changes the view of the player then. The link is https://github.com/iChun/Sync if you're interested. Also, if anyone knows of any 1.6 tutorials on this, those might not be totally obsolete and a good starting point, as usual.

Thanks for any help!

Hi

 

I think coolAlias was trying to do this less than a month ago and had some success.  It is tricky because it was not implemented in a modular way in the vanilla.

 

If he hasn't noticed your question, you could PM him, he is a very helpful bloke.

 

-TGG

Hi,

 

I was indeed able to get the camera angle to a higher position using some code that Noppes shared with me. You can read the full thread about it here.

 

The solution I posted there worked for 1.6.4, but I had to change a few things to get the mouse over position working correctly for 1.7.2. I'll put the highlights of it here:

 

 

// in EntityRendererAlt, I had to modify the offset amounts:
private float ySize = 3.0F;
private float offsetY = ySize / 2.0F;

// in the updateCameraAndRender method, I changed  offsetY to ySize:
mc.thePlayer.yOffset -= ySize;

// in getMouseOver, I did the opposite of 1.6.4 method, first subtracting offsetY, then adding it after the mouseover:
mc.thePlayer.posY -= offsetY;
mc.thePlayer.prevPosY -= offsetY;
mc.thePlayer.lastTickPosY -= offsetY;
super.getMouseOver(partialTick);
mc.thePlayer.posY += offsetY;
mc.thePlayer.prevPosY += offsetY;
mc.thePlayer.lastTickPosY += offsetY;

Note that the size is still hard-coded in my example - I multiplied the player's size by a factor of 3, thus they ySize of 3.0F. The mouseover is correct, but the the server still calculates distance based on the player's feet, so even though it looks like you can place a block at your eye height when you are huge, you may not be able to. If your camera change isn't this drastic, you may not even notice.

 

 

 

It's not perfect, as you can see, but it works for the most part and is a lot simpler than what I could find in iChun's Morph mod. Whether iChun's works any better or worse I can't say, as I've never tried his mod, but you it's open source so you can check it out for yourself: https://github.com/iChun/Morph

 

Good luck!

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.