How would you do a do collision detection best in Wc3?

GoGo-Boy

You can change this now in User CP
Reaction score
40
Hi there,
I'm currently thinking about adding a collision detection system to my map but I guess something like this needs way too much performance to be viable along other resource draining systems.
Yet I'd like how you would probably do this.
In my case I'd like to have units being bounced of terrain and doodads however not unit-unit.
For the terrain part I would be going with a circular terrain height check around the unit that's moved and calculate the bounce angles.
But for doodads, what to do? Add an x/y variable for each doodad and check whether the unit is in range when moving? I guess that consumes too much performance.
 

GoGo-Boy

You can change this now in User CP
Reaction score
40
I guess you mean this part:
JASS:
//* The IsTerrainPlatform works for any preplaced walkable destructable. It will
//* return true over bridges, destructable ramps, elevators, and invisible
//* platforms. Walkable destructables created at runtime do not create the same
//* pathing hole as preplaced ones do, so this will return false for them. All
//* other functions except IsTerrainWalkable return false for platforms, because
//* the platform itself erases their pathing when the map is saved.

?

Whatever, I have no clue what of that pathing system really helps in a collision detection. Knowing pathing types... isn't really helpful. And if that upper part works for destructables only and not doodads, you can forget about it anyways.
 

GoGo-Boy

You can change this now in User CP
Reaction score
40
Yah but as I said I don't want to check for other units. And the terrain isn't unwalkable because there's a unit. Could be a cliff or just unpathable terrain as well..
 

Zwiebelchen

You can change this now in User CP.
Reaction score
60
The library checks for cliffes and doodads too. It returns you a pathability state.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top