Mythos_Ruler Posted May 31, 2013 Report Share Posted May 31, 2013 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. Quote Link to comment Share on other sites More sharing options...
Josh Posted May 31, 2013 Report Share Posted May 31, 2013 (edited) 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 May 31, 2013 by Josh Quote Link to comment Share on other sites More sharing options...
Mythos_Ruler Posted May 31, 2013 Author Report Share Posted May 31, 2013 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. Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted May 31, 2013 Report Share Posted May 31, 2013 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 detectionSelection overlaysUnit spawningRally line renderingBuilding restrictionsWhereas 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). Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.