Template:ObjectLODInfo: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 5: Line 5:
If the model has a LOD version that you want to remove from the default map:
If the model has a LOD version that you want to remove from the default map:
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
    local modelIdLOD = 13245
local lowLodModel = 13245
    removeWorldModel ( modelIdLOD, 100, x,y,z )
removeWorldModel ( lowLodModel, radius, x,y,z )
</syntaxhighlight>
</syntaxhighlight>


Optionally, create a MTA LOD replacement so there is no hole in the map from a far distance:
Create a low LOD object for your high LOD object, so there is no hole in the map from a far distance:
<syntaxhighlight lang="lua">
<syntaxhighlight lang="lua">
    objLOD = createObject( modelIdLOD, x,y,z, 0, 0, 0, true )
local lowLodObject = createObject( lowLodModel, x,y,z, rx, ry, rz, true )
    setElementParent(objLOD, obj) -- so the LLOD element is destroyed with the HLOD element
setElementParent(lowLodObject, obj) -- so the LLOD element is destroyed with the HLOD element
    setLowLODElement(obj, objLOD) -- make the LOD assignment
setLowLODElement(obj, lowLodObject) -- make the LOD assignment
</syntaxhighlight>
</syntaxhighlight>

Revision as of 12:45, 4 November 2024

This template is used on object/building/models/LOD related pages.


Dialog-warning.svg Important info about Object LOD (Level of Detail)

(To determine the LOD model ID, use the editor resource, or refer to this this table)
If the model has a LOD version that you want to remove from the default map:

local lowLodModel = 13245
removeWorldModel ( lowLodModel, radius, x,y,z )

Create a low LOD object for your high LOD object, so there is no hole in the map from a far distance:

local lowLodObject = createObject( lowLodModel, x,y,z, rx, ry, rz, true )
setElementParent(lowLodObject, obj) -- so the LLOD element is destroyed with the HLOD element
setLowLODElement(obj, lowLodObject) -- make the LOD assignment