How does one fix entity mesh from being in weird places?

Started by NorthWestTrees on

Topic category: Advanced modding

How does one fix entity mesh from being in weird places?

I am looking for help fixing this odd issue... I think its a common issue with entries, after all, we know about creepers and how they were meant to be pigs...

I have been using Cubik Studio to do all my modeling for Blocks and Items as well as projectiles and I wanted to work on an entity and well... it did not come out as it looked in Cubik Studio, when its exported it looks fine but when I import the model into MCreator it seems to have odd locations for some of the component.

I make Tutorials for my YouTube channel and I was going to make a tutorial on how to make an entity using Cubik Studio as Techne is pretty much obsolete and Cubik studio supports all main components for MCreator modeling. I could use some help though figuring out this issue that's happening with it.

If you have experience with making models for entities, java code, or Cubik Studio it is self I would love if you would work with me to figure this issue out.

Here is a photo of the penguin... I had to hit it to get its head out of the ground... poor thing...

Penguin Problem

 

Since then I have removed the beak and fixed the body from rotating but the head remains underground and the wings are still too far apart.
I am not sure what to fix in the .java file to fix the offset, and I just need some guidance on either how to fix the offset in the .java or if guidance with setting up Cubik Studio for entire for MCreator.

Thanks in advance.
- NorthWestTrees Gaming

I have made a model with…
Mon, 08/12/2019 - 02:13

I have made a model with Block Bench, it seemed to fix the offset issue, however, I am trying to figure out in the code editor I can rotate the arms from forward and back to up and down like a bird.

 

rightArm = new ModelRenderer(this);
rightArm.setRotationPoint(0.0F, 24.0F, 0.0F);
rightArm.cubeList.add(new ModelBox(rightArm, 0, 22, -3.5F, -9.0F, -2.0F, 1, 7, 4, 0.0F, false));

leftArm = new ModelRenderer(this);
leftArm.setRotationPoint(0.0F, 24.0F, 0.0F);
leftArm.cubeList.add(new ModelBox(leftArm, 0, 21, 2.5F, -9.0F, -2.0F, 1, 7, 4, 0.0F, false));

I figure it has to do with the (.cubeList.add) an area as I have tried to offset the setRotationPoint from 24 to 33 (+9 pixels) and it lowered the model into the ground... I would think that I need to flip the axis somehow correct?

 

The other code I managed to work out was this section I did manage to change the direction form X to Z so it may have to do with this section of code here but I am not sure exactly what would rotate the axis around to the top or how I would do it. Can you please explain what all that stuff is after "MathHelper.cos"  dose so I can better understand what I need to.

this.rightArm.rotateAngleZ = MathHelper.cos(f * 0.6662F + (float) Math.PI) * 2.0F * f1 * 0.5F;
this.leftArm.rotateAngleZ = MathHelper.cos(f * 0.6662F) * 2.0F * f1 * 0.5F;

Thanks in advance.

PS: I will make sure to do a tutorial on it in the near future.

You should generally be able…
Mon, 08/12/2019 - 04:52

You should generally be able to set the rotation points in the modeler.

The second part is the animation part and these are calculations in radians to make the animations work. I would suggest you to use chicken model code for the base. We plan to add more animation types in the future updates too.

I am not familiar with block…
Mon, 08/12/2019 - 06:34

I am not familiar with block bench still learning a few things I have tried rotating the box in the program and exporting it and it just used the same position.

I could not figure out where the chicken code you speak of is. I tried generating a built-in chick model then checking the code but it did not have the same code section as the imported model code. I am not sure if this is a bug or not with it not showing up.

I did do some research and I did narrow it down to.

When I import the .java it pops up a (model animation wizard) I don't have any option for built-in animation I think its just the one player model animation type which is workable I just need to figure out how to offset the axis so that the rotation is on the other side to make it look like wings. I figure that the three numbers below are x, y, and z but the number 24 is thought me off as the model is under 16 pixels so I don't know why y-axis is above where the wings are rotating it makes no sense why it would do it on the side that's rotating. I will play with it a bit more tomorrow but I need some shuteye I need to get rest for the tutorials for you tomorrow ;)
 

leftArm.setRotationPoint(0.0F, 24.0F, 0.0F);

Techne calls it something else however its the same thing basically just the .setRotationPoint is named to .position or something.

If you have any ideas let me know :)

I did not play with this…
Mon, 08/12/2019 - 10:20

I did not play with this much yet so I can't tell you much more than to experiment a bit :) I do plan to research these animations and add better support and more animation types to MCreator in the near updates.

For the chicken model animations, check file ModelChicken.java, function setRotationAngles to see how they animated the wings.

Joined Jun 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
@NorthWestTreesGaming Can…
Mon, 08/12/2019 - 10:55

@NorthWestTreesGaming Can you make a blockbench tutorial? I can't understand all the others(Like explaining the whole program instead of the problem)