Jump to content

Clearance is sometimes half width, sometimes full width


Recommended Posts

What is clearance?

It is 0.8 for most units.  Roughly regarded as the size of a unit.  Reference:

https://gitea.wildfiregames.com/0ad/0ad/src/branch/main/binaries/data/mods/mod/simulation/data/pathfinder.xml#L58

Clearance as full width

In the calculation of pushing, each unit is first considered as a 0.8 × 0.8 square.  Then the radius of the circumscribing circle is 0.8 × √2 ÷ 2.  Reference:

https://gitea.wildfiregames.com/0ad/0ad/src/branch/main/source/simulation2/components/CCmpUnitMotion_System.cpp#L78

Clearance as half width

In regarding unit as obstruction, each unit is considered as an axis aligned 1.6 × 1.6 square.  Reference:

https://gitea.wildfiregames.com/0ad/0ad/src/branch/main/source/simulation2/components/CCmpObstructionManager.cpp#L305

Edited by stevenlau
Link to comment
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
 Share

×
×
  • Create New...