Registered with: RenderingRegistry.registerEntityRenderingHandler(BeastEntity.class, new BeastRender(new BeastModel(), 0));
I'm using Forge 10.13.2.1230
Now he loads fine and I can spawn him in no problems and he follows all of his tasks. It's just that his arms and legs rotate forever in one direction and don't swing back and forth. The setRotationAngles code is basically the same in every thread and video I've found. I'm clearly blind to my mistake here; could anyone please help me out?
Um, so the arms rotate constantly you believe? So then Math.cos MUST be equaling 1, or some other constant value greater than 0 and less than or equal to 1, which leaves cos as a constant, and movementSpeed to consistently increase, movementSpeed cannot increase, so the whole lot is 1 great big constant. However how can that be since rotateAngleX is assigned and not incremented that value? Therefore, cosis actually changing from 1 to-1 and back.
It is impossible for your arm to constaltly move in only 1 direction, it must either not move at all, or take a really long time to swing back down UNLESS movementSpeed is not a constant value.
So watch the arm over time, it should eventually swing back down. IF it doesn't over a period of say... 1 minute or so, then movementSpeed is not actually movement speed,but likely time.
Line 2 did indeed keep increasing and line 1 stayed at -0.9999218743284509 for the entirety of the test.
To be honest, the tag of movementSpeed was just what I read that it meant on another site. Seems it's wrong. I just find it easier to read proper words than the original f, f1, f2, f3, f4 and f5 that it had.
Just uploading a short video to show it exactly as I'm seeing it. I'll edit in the link when it's done.
Here are my current files:
BeastEntity - http://pastebin.com/mVZ5Bc3n
BeastRender - http://pastebin.com/fgAKLe3n
BeastModel - http://pastebin.com/HWBkL836
Registered with: RenderingRegistry.registerEntityRenderingHandler(BeastEntity.class, new BeastRender(new BeastModel(), 0));
I'm using Forge 10.13.2.1230
Now he loads fine and I can spawn him in no problems and he follows all of his tasks. It's just that his arms and legs rotate forever in one direction and don't swing back and forth. The setRotationAngles code is basically the same in every thread and video I've found. I'm clearly blind to my mistake here; could anyone please help me out?
this.Arm_Left_Top.rotateAngleX = (float) Math.cos(time * 0.2F + valuePI) * 0.6F * movementSpeed;
In-game it changed nothing I'm afraid.
Um, so the arms rotate constantly you believe? So then Math.cos MUST be equaling 1, or some other constant value greater than 0 and less than or equal to 1, which leaves cos as a constant, and movementSpeed to consistently increase, movementSpeed cannot increase, so the whole lot is 1 great big constant. However how can that be since rotateAngleX is assigned and not incremented that value? Therefore, cosis actually changing from 1 to-1 and back.
It is impossible for your arm to constaltly move in only 1 direction, it must either not move at all, or take a really long time to swing back down UNLESS movementSpeed is not a constant value.
So watch the arm over time, it should eventually swing back down. IF it doesn't over a period of say... 1 minute or so, then movementSpeed is not actually movement speed,but likely time.
OR, you can print out these lines to the console:
System.out.println("Cos part: " + Math.cos(time * 0.2F + valuePI));
System.out.println("movementSpeed part: " + movementSpeed);
See if line two keeps increasing.
To be honest, the tag of movementSpeed was just what I read that it meant on another site. Seems it's wrong. I just find it easier to read proper words than the original f, f1, f2, f3, f4 and f5 that it had.
Just uploading a short video to show it exactly as I'm seeing it. I'll edit in the link when it's done.
Link:
Is now:
Thanks for taking the time to stick with this to help me out. I'm gonna go and read/experiment some more so that I fully understand this.