Jump to content

Recommended Posts

Posted

For my mod, I need to make an entity that is comprised of more than one model (OBJ or Techne) For example, it renders a body, but then whatever the condition may be, other parts such as the arms are changed. I could just make models of every single combination; however, that would be tedious and would be a last resort. You could say that I want to stitch models together in minecraft.

 

Anybody got an idea on how this can be created?

Posted

Create a model containing all or both, then create separate render methods to call depending on the situation?

if (leftArm.activeWeapon == Weapon.cannon)

renderLeftArmCannon(..args..);

else

renderSomethingElse();

 

Check into how people are rendering cables depending on whether they are connected or not, that should give you the general idea :)

If you guys dont get it.. then well ya.. try harder...

Posted

Thats what I was thinking of doing however since the sheer amount of things that could be modified just doesn't make it viable. For example, the entity's head, body, legs, and arms, as well as weapons on both arms will change. Plus there are around 12-18 different parts for each section. (if you haven't guessed yet, it is going to be a mech)

 

I was thinking for having the entity be the body, then if the other parts are equipped, it is rendered another model relative to the position of the body. This works in theory, but I just don't know how to code/approach it.

Posted

Try getting the theoretical stuff down on paper, write everything down.

Then look at each part of the problem and try to break it down into smaller problems.

 

Maybe each part has it's own class which gets called by the body?

Then each part got the responsibility to render itself according to the parameters?

 

Thats what I was thinking of doing however since the sheer amount of things that could be modified just doesn't make it viable.

Why not? What problems do you see? :)

If you guys dont get it.. then well ya.. try harder...

Posted

how about you make a method for each area that can have a part and make them accept a byte as a parameter. and based on the byte you could render the parts differently. where 0 is none, 1 is cannon, 2 is arm, etc.

Posted

Thanks. I'll check the Player Renderer when I have time and i'll see if I can get something to work. If I need further help from there, I'll post again on this thread.

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

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

Announcements



×
×
  • Create New...

Important Information

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