EvilEngine/COLL: Difference between revisions

From Heavy Iron Modding
Content added Content deleted
No edit summary
No edit summary
Line 2: Line 2:
|subtitle=Collision Table
|subtitle=Collision Table
|type=[[Binary]]
|type=[[Binary]]
|games=Battle for Bikini Bottom<br>The SpongeBob SquarePants Movie<br>The Incredibles<br>Rise of the Underminer}}
|games=Battle for Bikini Bottom<br>The SpongeBob SquarePants Movie<br>The Incredibles<br>Rise of the Underminer
|sourcecode=[https://github.com/bfbbdecomp/bfbb/blob/master/src/Game/zCollGeom.h zCollGeom.h]}}


A '''collision table''' is used to give some [[MODL|models]] a specific mesh for collision detection by other objects and the in-game camera. This is commonly used to give high-poly models much less lower detailed versions of themselves, in order to reduce the amount of processing required during collision detection.
A '''collision table''' is used to give some [[MODL|models]] a specific mesh for collision detection by other objects and the in-game camera. This is commonly used to give high-poly models much less lower detailed versions of themselves, in order to reduce the amount of processing required during collision detection.

Revision as of 20:12, 30 March 2021

COLL
Collision Table
TypeBinary
Games usedThe Incredibles
Source codezCollGeom.h

A collision table is used to give some models a specific mesh for collision detection by other objects and the in-game camera. This is commonly used to give high-poly models much less lower detailed versions of themselves, in order to reduce the amount of processing required during collision detection.

By default, any model not included in this table uses itself as its collision mesh against other objects, and no collision mesh against the camera (meaning the camera can pass through it).

Format

The asset data starts with an int which defines the amount of entries in the collision table, then the entries themselves. Each entry has the following format:

Offset Type Description
0x00 AssetID (Model) Model
0x04 AssetID (Model) Collision model. If null, defaults to the same model.
0x08 AssetID (Model) Camera collision model. If null, defaults to no model (camera can pass through it).