Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Ability to set culldistance within mapeditor #302

Open
keku645 opened this issue Aug 7, 2021 · 0 comments
Open

[Feature] Ability to set culldistance within mapeditor #302

keku645 opened this issue Aug 7, 2021 · 0 comments
Labels
feature New feature or request

Comments

@keku645
Copy link

keku645 commented Aug 7, 2021

This is a must for level design, it can be used to save some fps or even if you need it like in this case, to force assets not being invisible in far distances.

Some code examples for CompositeMeshAsset and RigidMeshAsset.

--CWS_Railing96
ResourceManager:RegisterInstanceLoadHandler(Guid('4B4FD1D9-B1D7-86F0-8914-CC3B20140357'), Guid('57FB3DA6-CE2C-421B-A5A6-0D5E8AD31F57'), function(instance)
    
    local thisInstance = RigidMeshAsset(instance)
    thisInstance:MakeWritable()
    local CWS_Railing96 = (25)
	thisInstance.cullScale = CWS_Railing96

    print('Culldistance for CWS_Railing96 set.')
end)

--CatwalkCover_01_256_01_XP5_002_Clone
ResourceManager:RegisterInstanceLoadHandler(Guid('4716FEF7-2F54-91AF-8B6D-0C5C99E1D6AD'), Guid('FF83AB37-1D07-44EB-82F5-70877CD5DDB7'), function(instance)
    
    local thisInstance = CompositeMeshAsset(instance)
    thisInstance:MakeWritable()
    local CatwalkCover_01_256_01_XP5_002_Clone = (25)
	thisInstance.cullScale = CatwalkCover_01_256_01_XP5_002_Clone

    print('Culldistance for CatwalkCover_01_256_01_XP5_002_Clone set.')
end)

Default culldistance:

image

After setting culldistance:

image

@FlashHit FlashHit added the feature New feature or request label Jan 30, 2022
@FoolHen FoolHen changed the title [FEATURE] Ability to set culldistance within mapeditor [Feature] Ability to set culldistance within mapeditor Mar 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
Status: Backlog
Development

No branches or pull requests

2 participants