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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...