Started by
Ellivers
on
Topic category: Advanced modding
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
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?)
@#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!
@#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?
@#1.1.1 Probably, but the eye is cind of the whole thing with that mob..
@#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?
Yes i used techne.
And no, I don't really know what you mean with the boxes. Sorry..
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
@#3 Thank you so much!
thanks too i was looking for this