Jump to content

Recommended Posts

Posted

My other CME thread was going in this direction but this has nothing to do with CME so I'm moving it to a new thread. I read jabelars tutorial on creating models without techne or anything and I understood most of it. However, I was confused about addBox and rotation. How does the addBox method work? Do the boxes go upward or downward from the point specified (I.e. If I had a box with point 0,0,0, and dimensions of 1,2,1, would the end of the box be at 1,2,1 or 1,-2,1?)?. And where is 0,0,0 when you set the rotation point? Any information on this would be nice.

 

Thanks!

Creator of the MyFit, MagiCraft, Tesseract gun, and Papa's Wingeria mod.

Posted

The box is positioned relative to the rotation point, and the rotation point is relative to the origin of the overall model.

 

So if you have a rotation point for a box at 2, 3, 5 and have a box that is size 1, 1, 1, then one corner will be at 2, 3, 5 and other corner at 3, 4, 6.

 

Now, if you want the rotation point to end up somewhere other than the corner of the box, that is when you use the offset. So if you wanted the rotation point to be in the middle of the box above, you would set the offset to be -0.5, -0.5, -0.5.

 

So it is best to think in this order (but you don't code in this order, I'm just talking about how to figure out the numbers) :

  1) specify the rotation point

  2) specify the size

  3) specify the offset

  4) specify the rotation around the rotation point

 

Hope that helps.

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.