
Originally Posted by
MistaSub
I mean I suppose you already tried this, but there is a built in function to have object as "inactive" when far from window. I actually used this in previous version of my game, but it caused problems. I had thousands of river objects and while it did save a lot of frames, it desynced the animations naturally.
The thing is it's all fine if the gameplay is supposed to happen only around the player. For example if only the player needs to collide with these hitboxes, it would probably work fine.
But if it means platformer enemies will fall through them when you are far away, you will have to implement a system where you deactivate the enemies as well when the player is far from the hitboxes.
I don't know what kind of game you are making, but if this is an option I would think deactivating the enemies code would be safer, if possible. Then you could control at what distance this happens, and maybe you could avoid doing it to all the hitboxes and simply use the built in function. Does anyone by any chance know what this range of "far" is for the built in "deactivate if far from window" property?
I don't know, just a thought. I mean most likely the hitboxes aren't really doing much so unless you are hitting object limits, they shouldn't be too much of a problem.
**EDIT**
If it helps at all, I solved the river animation problem by syncing the animation to a single master object, which calculated the frame shifts, thus enabling me to have "inactive if too far on". Or maybe I made my own inactivation, I don't remember and I scrapped that project in favour of my new one which I can actually finish.