Stadium collision

From FIFA Manager Modding Wiki
Jump to navigation Jump to search

Sadium collision is configured in coll-X-Y.bin file (X - stadium ID, Y - weather ID). The collision is used to define how ball will interact with stadium geometry.

The format of the file is following:

UINT32 File type or version (2)
UINT32 unknown, probably unused (0)
UINT32 Number of collision geometries in the file
#FOR (Number of collision geometries in the file)
    VECTOR3 Bounding min
    VECTOR3 Bounding max
    UINT16 Positions count
    UINT16 Normals count
    UINT16 Triangles count
    UINT16 Unknown count (probably unused)
    #FOR (Positions count)
        VECTOR3 Vertex position
    #END FOR
    #FOR (Normals count)
        VECTOR3 Normal
    #END FOR
    #FOR (Triangles count)
        UINT16 Normal index
        UINT16 Vertex 1 position index
        UINT16 Vertex 2 position index
        UINT16 Vertex 3 position index
    #END FOR
    #FOR (Unknown count)
        UINT16 Unknown vertex index 1 (probably unused)
        UINT16 Unknown vertex index 2 (probably unused)
    #END FOR
#END FOR