Jump to content

Footprint vs. Obstruction vs. Projectiles


Recommended Posts

Right now, projectile hit detection is using the <Footprint> size of the unit. This is bad, especially if we want to add special fancy selection overlays to specific units (thinking hero auras) and buildings that are larger in size than the unit or building. For a perfect example of this, see the Spartan hero "Leonidas." Every projectile registers a "hit" on him because he has a mock up fancy selection ring on him. And right now selection rings use the <Footprint> tag to determine their size. Projectiles should use the target's <Obstruction> size instead or some other solution should be sought. But whatever the solution, the projectiles should not be using the size of the target's selection ring (<Footprint>)to determine whether it's a hit or not.

Link to comment
Share on other sites

I'll try to look into this along with my splash damage redesign. (It should just be a simple change to use different template data, right?)

Edit: Looks like a simple change to lines 550-572 in /simulation/components/Attack.js should fix the problem.

Edit2: Some of the following code could replace what's in there now, but I haven't found a way to get a entity's obstruction shape:


var cmpObstruction = Engine.QueryInterface(ent, IID_Obstruction);
cmpObstruction.GetUnitRadius()

Edited by Josh
Link to comment
Share on other sites

I'll try to look into this along with my splash damage redesign. (It should just be a simple change to use different template data, right?)

Edit: Looks like a simple change to lines 550-572 in /simulation/components/Attack.js should fix the problem.

I think leper may have had thoughts on this last time we talked about it on IRC, which admittedly was at least a month or more ago.
Link to comment
Share on other sites

I believe it was implemented with footprints because (typically) they more closely match the visual appearance of actors than do obstructions. Basically we use footprints for a bunch of things, at least the following:

  • Projectile detection
  • Selection overlays
  • Unit spawning
  • Rally line rendering
  • Building restrictions

Whereas obstructions are mostly used for pathfinder related stuff. The problem is there's not a 100% match of requirements between obstructions and the above tasks. The easiest solution would probably be to split selections off to some other concept outside the simulation (footprints and obstructions currently affect the simulation, selections should have no effect).

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.

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.

 Share

×
×
  • Create New...