Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#1477 closed defect (fixed)

Show selection overlay for actors in Atlas

Reported by: historic_bruno Owned by: vts
Priority: Should Have Milestone: Alpha 11
Component: Core engine Keywords:
Cc: vts Patch:

Description (last modified by historic_bruno)

We lost this when #824 was fixed. Actors don't have a Footprint and previously we would add a default selection ring for them, but now it silently fails.

Possible solutions: add a default Footprint to actor template construction or somehow use the bounding box of the actor to calculate a decent size. I think we could get by with the former since it would be no worse than we had before, and avoids having to add a bunch of special case handling to CCmpSelectable. Just need to make sure adding a Footprint to actors has no unintended side effects (I can't think of any yet). Of course it would look better if the overlay was scaled for different sized actors, if there's a reasonable way of doing so.

Change History (6)

comment:1 by historic_bruno, 12 years ago

Description: modified (diff)

comment:2 by vts, 12 years ago

Owner: set to vts
Status: newassigned

comment:3 by vts, 12 years ago

I think adding a default Footprint to actor-entities should be feasible, at least for now, for the exact reasons you already stated, and also that this is a change that should only be relevant for the map editor where pretty visuals aren't nearly as crucial.

Currently looking to see whether adding Footprints to actor-entities would have any adverse side-effects; if not, I'll commit the default Footprint.

comment:4 by vts, 12 years ago

At the time of writing, it looks like the Footprint component is used for the following purposes:

  • In the Selectable component, to determine the selection overlay size and shape.
  • In the RallyPointRenderer component, during the rally path computation, to remove path nodes that are located inside the footprint of the building.
  • In the VisualActor component, to support declaring the selection box' X/Z dimensions to equal the footprint size (rather than auto-computing it from the model vertices).
  • In the Attack component, for hit testing.
  • In the BuildRestrictions/GuiInterface components, to validate whether docks can be placed at a given location.
  • In the GarrisonHolder/ProductionQueue components, to figure out where to spawn ejected/created units.

Most of these don't apply to actor entities, but the Attack one may be relevant. I'm not familiar with the details of how this particular component works, so I'll look further into that :)

comment:5 by vts, 12 years ago

Resolution: fixed
Status: assignedclosed

In 11997:

Added default, arbitrary-sized Footprint component to actor entities. Makes their selection outlines show up in Atlas. Fixes #1477.

comment:6 by vts, 12 years ago

Looks like the Attack one doesn't matter either, since actors don't have a Health component for it to interact with.

Note: See TracTickets for help on using tickets.