setLodDistance

SetLodDistance <int - lod number> <float - distance>

The setLodDistance property allow you to set the LOD (Level Of Detail) ID then the distance it will switch to it. The number of ID's must match the number of ID's you are using in the exported mesh. When you export the mesh you can define the number of LODS. These correspond to the LOD ID. After you set the ID, you set the BF units distance from the camera it should switch to that ID.

Example:

This example uses 6 LOD's , 5 being the furthest from the camera and the least amount of detail.

GeometryTemplate.create StandardMesh Lcvp_ramp_M1
GeometryTemplate.file Lcvp_ramp_M1 -- if no path is given, it will get it from the root of the standardMesh.rfa
GeometryTemplate.setLodDistance 0 0
GeometryTemplate.setLodDistance 1 25
GeometryTemplate.setLodDistance 2 50
GeometryTemplate.setLodDistance 3 75
GeometryTemplate.setLodDistance 4 100
GeometryTemplate.setLodDistance 5 200

Valid object types

StandardMesh