# CNAT - Contact Attachment

CNAT - Contact Attachment
In multiple places the engine uses ContactAttachment values (a bitmask) to manage the orientation of objects and processes. For example, a vertex of an object can have the CNAT bit left. If that object has ContactCalls activated, the engine calls on every contact of that vertex with the landscape the object script function ContactLeft. CNAT values are composed of the following bits:

Bit
Value
CNAT
Description
0
1
CNAT_Left
Direction: Left
1
2
CNAT_Right
Direction: Right
2
4
CNAT_Top
Direction: Up
3
8
CNAT_Bottom
Direction: Down
4
16
CNAT_Center
Direction: Center (not for attachment)
5
32
CNAT_MultiAttach
Special flag: new attachment behaviour for objects with the same direction value at several vertices.
6
64
CNAT_NoCollision
Extra flag: non-colliding vertex
CNAT

Sven2
2002-04
Newton & Günther
2005-01
Matthes
2005-08