• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Collision size

Status
Not open for further replies.
Level 4
Joined
Sep 11, 2018
Messages
74
How do you increase collision size of a unit so that other units cannot move into the unit? I've tried increasing maximum collision in gameplay constants but it doesn't work. I've also tried changing the unit into building and set pathing map then changed it back to unit. It works in editor but not in game. Any ideas? I'm using tank models from hive and they go through each other.
 
Level 39
Joined
Feb 27, 2007
Messages
5,023
I vaguely remember something about collision sizes only being valid if they are powers of 2? Or maybe it was acceptable max collision size if you change the constant? There are some things just hardcoded into the game that look like they can be changed but just can't, perhaps the max collision size is one of them. Try setting the max and the collision size of your tanks to the next highest power of 2 past the default max.

I could also be crazy and my brain is making this up, so if you find it doesn't change anything then I'm definitely just wrong.
 
Level 20
Joined
Aug 29, 2012
Messages
832
I vaguely remember something about collision sizes only being valid if they are powers of 2?

Blizzard's spellbreakers and footmen have a collision of 31, I doubt this is a thing. Edit: weirdly enough, the majority of other units' collision is a multiple of 2, except ghouls, murlocs and a few others. Consistency much! But still, their collision functions in game nonetheless.

Maybe it's an issue with the models themselves? I remember seeing collision spheres and stuff like that in War3 Model Editor, they could be related to ingame collision, but honestly I have no clue.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
Maybe it's an issue with the models themselves? I remember seeing collision spheres and stuff like that in War3 Model Editor, they could be related to ingame collision, but honestly I have no clue.
Those are for hit detection when it comes to players interacting with the unit. If the cursor is over collision geometry when the mouse is pressed the unit will be selected. This is needed for some models which have very fine or fast moving geometry.

An example of a unit that really should have had better collision geometry is the Void Walker. The attack animation of the Void Walker has the model move huge distances making targeting it very difficult. DotA Allstars solved this with a custom model that had appropriately sized collision spheres so that the hero using the model could be reliably targeted by players irrespective of the animation being played.
How do you increase collision size of a unit so that other units cannot move into the unit?
Gameplay constants and object editor. That said there is an upper bound maximum which is still quite small. There is no work around for this upper bound maximum. The only solution is to redesign the map around not requiring units with impossibly large collision.
 
  • Like
Reactions: Kam
Status
Not open for further replies.
Top