Mob model animation problem

Started by Ellivers on

Topic category: Advanced modding

Last seen on 19:56, 11. Aug 2019
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
Last seen on 12:58, 23. Sep 2019
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?)

Last seen on 19:56, 11. Aug 2019
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!

Last seen on 12:58, 23. Sep 2019
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?

Last seen on 19:56, 11. Aug 2019
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..

Last seen on 12:58, 23. Sep 2019
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?

Last seen on 19:56, 11. Aug 2019
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..

Last seen on 23:44, 18. Aug 2019
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

Last seen on 19:56, 11. Aug 2019
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!

Last seen on 20:32, 15. Feb 2023
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