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

Is there a way to move the 3rd person camera further back? I'm working on big vehicles right now, and they clip into the camera currently.

 

The code I've attempted is both creating an entity in-world, having it follow the player 10 blocks back (on it's LookVec), and this:

 

(assuming

mc = Minecraft.getMinecraft();

)

 

@SubscribeEvent
public void onRender(RenderGameOverlayEvent.Pre event)
{
    Vec3 vec3 = mc.thePlayer.getLookVec();
    double dx = vec3.xCoord * -10;
    double dy = vec3.yCoord * -10;
    double dz = vec3.zCoord * -10;

    mc.renderViewEntity.copyLocationAndAnglesFrom(mc.thePlayer);

    mc.renderViewEntity.posX += dx;
    mc.renderViewEntity.posY += dy;
    mc.renderViewEntity.posZ += dz;

    vec3 = null;
}

 

and both samples cause the camera to jitter back and forth between the correct player position and the new position. Any ideas or help appreciated! Thanks

There's a file somewhere called entityRenderer and in that file there's some fields called thirdPersonDistance and thirdPersonDistanceTemp. This should be enough to get you started.

 

Hint: look at the orientCamera() method too

"you seem to be THE best modder I've seen imo."

~spynathan

 

ლ(́◉◞౪◟◉‵ლ

  • Author

I overwrote

mc.entityRenderer

with an extended class that had public getters and setters, and set

mc.entityRenderer

to it in the

ClientProxy

. works like a charm! Thanks.

  • 5 months later...

I hate to restart an old topic but I was wondering if anyone can elaborate on parzivail's idea I cant seem to get a solution using his hint

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.