Skip to content

five-on-it / packages/net-client/src/mirror / mayTouch

Function: mayTouch() ​

mayTouch(e, centre, horizon): boolean

Defined in: packages/net-client/src/mirror.ts:156

Whether a twin may touch the entity at centre within horizon seconds: within NEAR_MARGIN plus what both cover at their speeds in that time. A car setting off toward the player from nearby enters a zone drawn by this a little late for its blend (blendSeconds), which costs centimetres of drawn gap at the touch (the lateness' share of a small gap), nothing a term for what the two could add accelerating would be worth: such a term grew the zone fivefold at every lead and without bound through a stall.

Parameters ​

e ​

EntitySnapshot

centre ​

EntitySnapshot

horizon ​

number

Returns ​

boolean