Jump to content
stupor-mundi

Trees, forest, collision detection of shots

Recommended Posts

Since the last update trees are obstacles for tank (and artillery) rounds. Before, shots would go through unhindered. I was happy about the change because it gives trees and forests some tactical importance, beyond just hiding tanks.

It became quickly apparent that the trees as obstacles weren't always exactly where the trees were, visually. I'm guessing this has to do with the computational cost.  When you consider a shot going through a forest, the cost of collision checking, based on the individual trees, would probably be too much. OTOH, in the case of a shot on a path that crosses a few isolated trees, this isn't a problem. So there will be some tree bunching/combining operation, I imagine, which will be responsible for the discrepancy between the seen trees and the trees as obstacles.

I guess this is a pretty tough problem to solve, but I hope something can be done to improve it. Currently there is no path equality with regards to the shot direction. I.e. two tanks facing off, with some trees between them, let's say the trees closer to one tank: often one tank will be able to shoot at the other, having a collision-less path through the trees, but not conversely.

The situation also creates a problem, players vs AI's: a tank moving through forest, with no chance for a player to land a hit it due to the unpredictability of the collisions, not a problem for the AIs which probably collision-check potential shots x times per second, against the actual obstacle locations, not the visual ones.

 

Edited by stupor-mundi

Share this post


Link to post
Share on other sites

Stupor, do you think it's gone too far in the other direction?  I can't remember being able to push over a small sapling of a tree for cover in a great while now it seems.

Share this post


Link to post
Share on other sites

Tank AP rounds and even MG bullets should pass through trees unhindered unless there are several of them in the way.  IIRC our old SLRs with the then standard NATO 7.62mm (which is similar to WW2 era MG and rifle bullets) could easily pass through 18 inches of growing wood and kill someone the other side.  We were always taught that almost everything except three feet of wet sandbags is cover from view but not cover from fire.  These rifle bullets would pass right through a solidly built brick house and still be lethal.

 

 

Edited by unreasonable
  • Like 1

Share this post


Link to post
Share on other sites
14 hours ago, J5_Baeumer said:

Stupor, do you think it's gone too far in the other direction?  I can't remember being able to push over a small sapling of a tree for cover in a great while now it seems.

 

I get the impression solidity of trees with regards to pushing them over has been coded independently from how they act as obstacles for shots.

 

It seems to me that aspect can be at least partially controlled by the mission designer. At least it feels as if the trees in some missions are near impossible to push, whereas in others it's easy.

  • Like 1

Share this post


Link to post
Share on other sites
On 11/1/2018 at 8:20 PM, stupor-mundi said:

 

I get the impression solidity of trees with regards to pushing them over has been coded independently from how they act as obstacles for shots.

 

It seems to me that aspect can be at least partially controlled by the mission designer. At least it feels as if the trees in some missions are near impossible to push, whereas in others it's easy.

 

I believe it's only dependent to the type of trees present already present on the map, and some parameters like if they belong to a forest border, road side etc... 

Because they look the same doesn't necessarly means they are the same object and share the same code. 

 

As far as I know there are no functionnal tools to edit the landscape, not in the mission editor at least.

Edited by F/JG300_Gruber

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×