Author Topic: Making spaces between two buildings (of the same building) clickable  (Read 836 times)

Pizza90

  • Draco Rider
  • *****
  • Posts: 282
    • View Profile
Some factions (for example romans) have buildings made up by two buildings or that contain spaces, these spaces are not clickable, i think they should because they are within the borders of the circle (the one that appears when you select buildings) and because it would be handy :)

I add a picture to explain better the thing :) :

http://postimage.org/image/hajivph9p/

(the red parts are those you can click now and  that you could click with my idea)
I translated Megaglest in italian and i keep the translation updated.

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
I disagree. What if you have one unit inside the cellmap of a building? Who do you click then? As well, the circle around the unit is 2D, while the unit itself is 3D. To further complicate overlapping, what about a unit that is slightly larger than the tile they stand on (say, they have a long sword that extends a bit). If that extends into a tile of another unit, then who do we select when clicking that sword? Even more, what if a unit is behind the building, and they're visible through the gap in the building. Does clicking through that gap select the building or the unit behind it?

Binding the selection to the model allows accuracy and ensures the player selects what they clicked on: every time.

If it's a big problem in specific models, though, you can always add an invisible box in the gap, which would allow it to be selected, although it would open those gaps up to the limitations listed above.
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

Coldfusionstorm

  • Golem
  • ******
  • Posts: 868
    • View Profile
Im kinda curious here, i have the problem that even ....... brb testing something

Thanks man, you just made me aware of why i had a problem that i could not click units inside my buildings cellmap, Because there was a layer of mesh underground, wich also solves your problem Pizza90, if you want to allways have the building cliclable just add a mesh underneath it, just a plain flat mesh.
« Last Edit: 8 July 2012, 10:07:45 by Coldfusionstorm »
WiP Game developer.
I do danish translations.
"i break stuff"