User Tools

Site Tools


guides:checklist-for-platform-collider

Adding Platform Collider to a Building

The Example02 contains a platform-collider: a mesh over the ground on which the villagers can climb and walk.

Once your building is well displayed in game, here is a simple check list to be sure you didn't forget something about the collider:

1) Processor

-- Apply building asset processor
myMod:registerAssetProcessor("models/myFbxName.fbx", {
    DataType = "BUILDING_ASSET_PROCESSOR"
})

2) Mesh named COLLIDER (in upper case, without prefix or suffix) in the fbx file, under the mesh of the building part myBuildingPart (should contain “Part”)

3) Flag PLATFORM (in upper case, without prefix or suffix)

-- Register flag assigner component on the collider's type to 'PLATFORM'
myMod:configurePrefabFlagList("models/myFbxName.fbx/Prefab/myBuildingPart", { "PLATFORM" })

Note:

1) it is possible that the builder does not climb the COLLIDER (because it is not built yet when the builder comes)

2) a villager can climb vertical faces of a COLLIDER

3) in order to check, you can also temporary set a texture on the COLLIDER

guides/checklist-for-platform-collider.txt · Last modified: 2021/02/23 11:55 by minotorious