DarkestHour icon indicating copy to clipboard operation
DarkestHour copied to clipboard

Obstacle's destroyed via explosives have hit detection issue

Open cmbasnett opened this issue 9 years ago • 5 comments

Originally reported by: Andrew Theel (Bitbucket: AndrewTheel, GitHub: AndrewTheel)


The code to trace explosive origin to obstacle origin is problematic because the origin on obstacle meshes are often under terrain. So the trace doesn't succeed.

Solution #1: Raise origin point on all obstacle meshes. This would require a complete realignment of all obstacles in levels. A script however could be created that would automatically do that.


  • Bitbucket: https://bitbucket.org/darklightgames/darkesthour/issue/315

┆Issue is synchronized with this Trello card

cmbasnett avatar Jun 06 '15 03:06 cmbasnett

Original comment by Colin Basnett (Bitbucket: cmbasnett, GitHub: cmbasnett):


Would be a considerable amount of effort to get this working at this stage in the game. Putting this on hold until a new version.

cmbasnett avatar Jul 12 '15 03:07 cmbasnett

I'll take this as must be same cause & probably very similar solution as for https://github.com/DarklightGames/DarkestHour/issues/462.

handsm avatar Dec 23 '15 08:12 handsm

Thought about this. Two solutions:

  1. Code fix, making blast damage functions (HurtRadius) adjust the height to trace to an obstacle in the blast radius. Would mean a standard Z offset for all obstacles. Assuming all obstacles can be adjusted by the same Z offset, this is pretty easy. It is slightly hacky though and (2) would be a better solution if it can be done.
  2. Edit the obstacle static meshes & then edit maps to raise their Z positioning, as the edited meshes will now be sunken into the ground. The statics edit is a very boring hour or so (export, import to modelling app, edit, export, import to SDK, save ....). The map edit sounds like more work, but again assuming all statics can be edited with the same Z adjustment, it would actually be very quick per map. Just select any obstacle, right click and select all obstacles, then drag them up by the standard amount until they look right again. Or a script to do the same if you're clever ! Best to do this soon, before custom mappers start using lots of obstacles that would need editing.

handsm avatar Jan 10 '16 18:01 handsm

I really wish we would have known this silly requirement of origin being above terrain when we chose the origin for the fences/obstacles. Adjusting the origin with only Z would not work, as these fences are rotated. When you change the origin it affect it relative to it. When you move a bunch of selected actors, to lower back down you move them relative to world. A script that will calculate the new position from the position it is currently, from on the z-height change of the modified origin would be required. It is already too late and no rushing is required because we already have 10 or so maps with now thousands of placed obstacles.

AndrewTheel avatar Jan 11 '16 05:01 AndrewTheel

I will look back into this issue when we make mortar, satchel, and other high explosive damage pen walls.

AndrewTheel avatar Sep 07 '16 01:09 AndrewTheel