Jump to content

[SOLVED!] [1.7.10] Model Attachment


Recommended Posts

Hi guys, how can I attach a part to another part/model so that I don't need to modify the rotation points everytime?

I'm making an animated hairs mod and I started with straight long hairs, to make this I divived the part behind the head into more segments so I can manage to animate them better, this is the scheme:


|||| -> Head level "HARD"

|||| -> Head level "MID"

|||| -> Head level "SOFT"

|||| -> Head level "END"


I made segments for each head level (that's the actual head height from an EntityPlayer), and I want to animate those segments based on the player speed and that's what happens:


|||| \

||||  \

||||  \    <- this diagonal is how the hairs are animated;


when I want something like this:



|||| |

||||  \__

||||        \    <- this is what kind of angles I want, imagine the strong wind in the last level and weak wind in the second one.



I think the problem is on the part's offset, since they are all in the same spot according to the orizzontal level, example:


In the X level 1 there are 4 segments with all the same offset level on X level 1, each one with a different Y level;

In the X level 2 there are 4 segments with all the same offset level on X level 2, each one with a different Y level, etc...

And all offsets are at the same Y level.


So obviously I thought that using an unique offset for each segments would be good, but If I put a segment in the X level 1 and Y level 1 when I need to animate it, like getting moved from the wind using the method rotateX, they will still be in the same position but with the custom angle INSTEAD of being attached to the previous segment.


TL;DR: How to attach a part to another part with an unique offset so that when I animate them they will still be attached to that part?


EDIT: "addChild(ModelRenderer yourModel);" is the way

Link to comment
Share on other sites

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.

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.


  • Create New...

Important Information

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