Jump to content

Recommended Posts

Posted

Hello,

How can I make multiple Bounding boxes in one block and how can I:

        1. Detect if one of the boxes is kicked?

        2. Highlight them all at once when I mouse over one of them?

        3. Remove the bounding box lines?

Edit: 4. Change them with the Tileentity?

 

Thanks ^^

 

Busti

PM's regarding modding questions should belong in the Modder Support sub-forum and won't be answered.

Posted

Hi

 

Some thoughts-

What do you mean "bounding boxes" - i.e. which bounding boxes?  just the ones that highlight when your mouse is over the block?  or used for collisions as well?

 

I'd suggest a general approach of using a single bounding box that encompasses all of the smaller bounding boxes, then if a "hit" is detected, perform more extensive checking to see if any of the smaller multiple bounding boxes is hit.

 

You can change the block highlight code by tapping into DrawBlockHighlightEvent and drawing the highlights yourself (or none at all, if you want to remove them).

 

Best way to change the boxes with a TileEntity is to store the information in the TileEntity itself (NBT data).

 

This are reasonably advanced techniques by the way.  Are you sure you really need multiple bounding boxes?

 

-TGG

 

 

 

 

Posted

I'd suggest a general approach of using a single bounding box that encompasses all of the smaller bounding boxes, then if a "hit" is detected, perform more extensive checking to see if any of the smaller multiple bounding boxes is hit.

^ I'd opt for this as well.

You may find this other thread of interest in regards to hitting parts of a block: http://www.minecraftforge.net/forum/index.php/topic,14324.0.html

If you guys dont get it.. then well ya.. try harder...

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.