parzivail Posted November 26, 2015 Share Posted November 26, 2015 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 Quote Link to comment Share on other sites More sharing options...
thebest108 Posted November 26, 2015 Share Posted November 26, 2015 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 Quote "you seem to be THE best modder I've seen imo." ~spynathan ლ(́◉◞౪◟◉‵ლ Link to comment Share on other sites More sharing options...
parzivail Posted November 26, 2015 Author Share Posted November 26, 2015 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. Quote Link to comment Share on other sites More sharing options...
Thornack Posted April 29, 2016 Share Posted April 29, 2016 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.