i'm making a forest type game, i want to disable tree visibility when the player is far from them. how do i do this?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By umma

i want to improve the fps, how do i do this using gdscript or a setting in godot?

Are you making a 3D game? https://forum.godotengine.org/91042/how-to-change-render-distance-in-editor

exuin | 2021-04-27 19:47

Are you making a 2D game? https://docs.godotengine.org/en/stable/classes/class_visibilityenabler2d.html
I’m not sure, but perhaps this node was created for this

Mak | 2021-04-28 15:34

:bust_in_silhouette: Reply From: Wakatta

You can use and Area on your player and when a tree enters show it and hide it when it exits using the body_entered or body_exited signals respectively

:bust_in_silhouette: Reply From: magicalogic

You can use a visibility notifier and disable processing of the nodes when they are out of the screen.