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

Hi

I have rendered an arm model but the problem is that I want it to stay in front of the player much like the vanilla first person arm. I tried rotating the model based on pitch and yaw of the vanilla arm but most of it goes wrong. The yaw works fine for rotating the model up and down (in fact, it does that perfectly from what I can tell). The pitch, however, because of the model's offset / axis rotates in a weird way. Instead of rotating with the player, when the player's pitch is changed the arm tries to rotate - when it does the arm rotates in a circular motion (a simple example would be the circular motion of a drill bit, for instance). How do I correctly rotate the model ignoring the fact that the offset is at the end of the model? I hope that made sense and thanks if you are able to help out!

Development of Plugins [2012 - 2014] Development of Mods [2012 - Current]

Before attempting any kind of animating, it is very important that your model is correct. If any rotation points are off or pieces of the model are acting independently (i.e. not added as children of a parent part), then you are just making the task 1000x more difficult than it should be.

 

If your model is all set up correctly, then be aware that the axis of rotation is also affected by the model itself - if you have a box that is rotated naturally by some amount, the yaw/roll/pitch axes are relative to the box's rotation, not necessarily that of the entity.

  • Author

Thanks, coolAlias. My model is exactly the same as the vanilla model arm from the ModelPlayer class. The dimensions, texture UV, etc. The vanilla rendering of the first person hand starts in the ItemRenderer class and eventually calls a method ModelPlayer. Do you know how to actually make the model move or become attached to the player like a regular player part (such as the head or arm)? If I can do that, I can just call several GL functions to get it in front of the player and only enable first person rendering to get what I want.

Development of Plugins [2012 - 2014] Development of Mods [2012 - Current]

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.