Opened 7 years ago

Last modified 5 years ago

#4449 new defect

Circular bounding box selection shape

Reported by: elexis Owned by:
Priority: Nice to Have Milestone: Backlog
Component: Simulation Keywords:
Cc: Patch:

Description (last modified by elexis)

Selection shapes are square, but some buildings are round. Thus the player sometimes selects a building when trying to click on a unit standing behind it:

http://trac.wildfiregames.com/raw-attachment/ticket/4449/bbox.jpg

Everything in the green box is assumed to be the civic center when selecting.

input.js calling PickEntityAtPoint from Selection.cpp calls PickAllEntitiesAtPoint from CCmpUnitRenderer.cpp which uses a CBoundingBoxOriented to check for the things beneath the mouse cursor. In BoundingBoxOriented.h we find this unflagged TODO that would address this issue:

 * However, it could also be used to represent more generic shapes, such as parallelepipeds.

Most recently reported by !Djarskublar and briefly discussed in https://wildfiregames.com/forum/index.php?/topic/21502-building-clickmaps-not-aligned-well/

Attachments (1)

bbox.jpg (498.4 KB ) - added by elexis 7 years ago.

Download all attachments as: .zip

Change History (4)

by elexis, 7 years ago

Attachment: bbox.jpg added

comment:1 by elexis, 7 years ago

Description: modified (diff)

comment:2 by FeXoR, 7 years ago

Since we have silhouetts for units I wonder if we can't use that for selection so the visual size and shape matches the area to click on means selecting it. If so use it for both, units and buildings.

This won't solve all issues since still a unit can be present behind a building or other unit. In AoE2 (And AFAIK Starcraft too) this is solved by clicking another time within the silhouette of an entity selects the "next" entity (ordered by distance from camera) which silhouette is also hit by the point of the curser (Double click did something else IIRC select all units of the same type - so waiting a short time before clicking again was requred).

Over all this doesn't seem to be that bad an issue for dragging selection boxes will most of the time work fine. Still this should be thought through and be fixed.

Version 1, edited 7 years ago by FeXoR (previous) (next) (diff)

comment:3 by Imarok, 5 years ago

Component: UI & SimulationSimulation

Move tickets to Simulation as UI & Simulation got some sub components.

Note: See TracTickets for help on using tickets.