Mob model animation problem

Started by Ellivers on

Topic category: Advanced modding

Joined Aug 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Mob model animation problem
Sat, 08/19/2017 - 14:42 (edited)

I'm have trubble with my models for my mod. GandyManCan helped me to add these lines of code to make the model animate:

this.head.rotateAngleY = f3 / (180F / (float)Math.PI);
this.head.rotateAngleX = f4 / (180F / (float)Math.PI);
this.leftleg.rotateAngleX = MathHelper.cos(f * 1.0F) * -1.0F * f1;
this.rightleg.rotateAngleX = MathHelper.cos(f * 1.0F) * -1.0F * f1;

But the Problem is that the head won't animate correctly.

Here is an image (spoiler alert):

As you can see the head doesn't work at all.

Edited by Ellivers on Sat, 08/19/2017 - 14:42
Joined Aug 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You mean the head is not in
Sun, 08/20/2017 - 08:27

You mean the head is not in the right position, or it's not animating?

Is it bent? (Did you give it any "angles parameter" in techne or what are you using?)

Joined Aug 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:You mean the head is not in
Sun, 08/20/2017 - 10:26

@#1

1. Don't you see the image? It is not in the right position, well, sometimes it is.

2. Nope, I didn't give any angles parameter. Pls help!

Joined Aug 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:RE:You mean the head is not in
Sun, 08/20/2017 - 14:04

@#1.1 it's an Image, I do not know if it was your intention to make that head move weird or something lol

Removing the head's animation lines bring it to the normal position?

Joined Aug 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:RE:RE:You mean the head is not in
Sun, 08/20/2017 - 14:17

@#1.1.1 Probably, but the eye is cind of the whole thing with that mob..

Joined Aug 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:RE:RE:RE:You mean the head is not in
Sun, 08/20/2017 - 15:23

@#1.1.1.1 Most likely you've set the head rotation point in a different location than the body.

Did you use techne? Can you control if the head box position is right the same as the body box?

Joined Aug 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:RE:RE:RE:RE:You mean the head is not in
Sat, 08/26/2017 - 07:38

Yes i used techne.

And no, I don't really know what you mean with the boxes. Sorry..

Joined Apr 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It looks like your model is
Sat, 08/26/2017 - 13:03

It looks like your model is using the corner of the head as its point of rotation.

If you click the block for your models head, there should be a little blue ball in the corner. Use the offset function (just "offset", not, "texture offset" to get the blue ball directly under the head where the neck would be, and then use position to move the blue ball and head back into the correct position on the body (if it moves while being offset, which it probably will).

This should fix your problem

-Eonaut

Joined Aug 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:It looks like your model is
Sat, 08/26/2017 - 14:57

@#3 Thank you so much!

Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
thanks too i was looking for…
Wed, 04/22/2020 - 00:49

thanks too i was looking for this