View Single Post
  #77  
Old 07-05-2011, 11:16 AM
ZaltysZ's Avatar
ZaltysZ ZaltysZ is offline
Approved Member
 
Join Date: Sep 2008
Location: Lithuania
Posts: 426
Default

Collidable trees are not such complex problem. You don't need to check every tree. You only need to check nearby trees. This usually is accomplished by using octree data structure, which divides space into smaller cells, whose in turn are divided further. This way, when you search "nearby" trees, you begin your "walk" from largest cell (part of map) where aircraft is, then choose smaller one inside the previous one and so on, until you get the set of smallest ones, whose can contain part of your plane. This way even if you have million of trees, you will check only 0-10 of them. It is not something unusual and is widely used.

Problems arise when you have lots of objects to check their collisions with trees. However, if only planes were checked, that object count would not be so big. In DCS, the problem is not collision detection itself, it is possible, but people want more: fire and detection cover provided by trees. That and AI pathfinding is problematic.
Reply With Quote