Jump to content

Sprite bounding box


prvi_treti
 Share

Recommended Posts

Hello there,

 

  I just finished MVA course (thanks to English subtitles (jk)) and hope my question makes some sense :) As I consider an isometric game involving map, I need something like,

 

3HTqYwj.jpg

 

as in Dao Chemicals building of Simcity 4. When I asked Ocean Quigley about it, he briefly said that "We UV'd the building sprites onto those boxes" . But considering that I will use prerendered assets ie sprite, I wonder if it is wiser and/or possible to use a bounding box for sprite , something like

 

PUGpMzS.jpg

 

And considering that I also need to highlight sprite when mouse is over like

 

dX76Z9E.jpg

 

So my question is, should I go with UVing simple geometry or use sprite with bounding box? And In case of latter (which I favor), does it lead to any issue I can't foresee atm?

 

Thanks in advance,

 

 

 

Link to comment
Share on other sites

Hey, thank you for my english accent :D

 

I would rather go with UVing simple geometry because you will have more control over positioning, collisions and special effects

 

Thanks for reply.

 

Beside the fact that I still didn't fully get how to UV simple geometry because at all examples they UV a crate :) , wouldn't it be a problem to highlight "texture" when mouse is over box but not over texture itself?

Link to comment
Share on other sites

Do you want to highlight only when mouse is over the texture right?

 

Sorry for late reply.

 

Indeed, I want to highlight texture/sprite only when mouse is over/down. In addition to this, for future collision detection I need a bounding box(/mesh/simple geometry ? not sure how to call it) as well.

Link to comment
Share on other sites

Bounding boxes/bounding spheres collisions are provided out of the box

For texture picking, you can use scene.pick and then use the pickingResult object to get the UV of the picked point

 

Sorry for late reply, pity didn't have chance to try your suggestion yet but will be pleased if you can clarify whether (for example),

 

mNSNmtq.jpg

 

container next to building (outlined in red) can be picked this way or not.

 

Thanks in advance.

Link to comment
Share on other sites

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
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...