![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | razor7131 |
Is there a way to put an object into sleep like state?
I have a 2d project with a map that let player to explore around with enemy spawning each time the player come, however I want the player to have freedom to explore each area seamlessly so he can move one to another area without any level transitioning, but that come with price of the performance since the enemy will keep spawning.
I tried to only make them visible within certain radius but that didn’t work quite well, I had a thought about record their presence, freed them and load them again once player come within radius but I’m afraid it will become more and more complex in the future and become unmanageable, if bugs occurs it would be a nightmare.
Is there a better way to handle this? thanks in advance.
What node type is the object you need to deactivate?
yanb | 2020-11-03 16:36
It was KinematicBody2D and StaticBody. And just in case you are wondering, the type of project I made, is similiar to Rune Factory 1 but with larger area and more variety of monster each totem can reproduce. Now I think about it, to destroy them completely if player leave them, but it will be pretty unchallenging I think…
razor7131 | 2020-11-03 21:16