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 )
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:
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)
Change History (4)
by , 7 years ago
comment:1 by , 7 years ago
Description: | modified (diff) |
---|
comment:3 by , 5 years ago
Component: | UI & Simulation → Simulation |
---|
Move tickets to Simulation
as UI & Simulation
got some sub components.
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.
Using parallelepipeds/cylinders/elyptical "Streckkörper" won't work much better.