2
\$\begingroup\$

I am attempting to make a sea serpent, and I want to know how to make it be able to turn in any place, or at each 'segment', somewhat like the snakes in mocreatures. I know how to make mobs in general, rendering and modelling, as well as AI, so it's just this single element.

I am using Forge if that helps.

\$\endgroup\$
3
  • 4
    \$\begingroup\$ Pretty broad question in the title. If it's complex, it's unlikely there's going to be an answer that's general enough to cover how to make any given mob. Focusing on the sea serpent will make the question too localized, since it's unlikely to help any future visitors. For most complex tasks you can divide and conquer. Break up the task into manageable sub-tasks and complete them separately. Then join them together to create your finished mob. \$\endgroup\$
    – House
    Commented Dec 14, 2012 at 6:29
  • \$\begingroup\$ @Byte56 Maybe, just maybe, the question title should be changed to "an articulated mob" so it's not too general and not too localized? \$\endgroup\$ Commented Dec 14, 2012 at 10:21
  • \$\begingroup\$ @LaurentCouvidou Yeah, change it, the community will decide. I don't really think "how to make mod x" are on topic for this site anyway, (I think it's better to ask on the forum for whatever game the mod is for) but I'm just one person. \$\endgroup\$
    – House
    Commented Dec 14, 2012 at 15:59

1 Answer 1

2
\$\begingroup\$

I would look into the model class, particularly the Ender Dragon model class, to see how the wings are animated.

If you want a good place to start, looking at the chest model class can help. It shows the barebone basics of how a multi-boned/part mob works, with each 'box' having a different rotation around whatever axis, allowing you to rotate it somewhat like this:

public ModelRenderer segment;

public ModelSnake() {
    this.segment.addBox(0.0F, -5.0F, -14.0F, 14, 5, 14, 0.0F);
    this.segment.rotationPointX = 1.0F;
    this.segment.rotationPointY = 7.0F;
    this.segment.rotationPointZ = 15.0F;
}

public void renderAll() {
    this.segment.render(0.0625F);
}
\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .