Im building a game where i want the environment to disappear when the distance to the player is bigger than a certain number.
What is better performant:
To have one script cycle through all the objects in the scene every frame and check the distance to the player, would do this with: for obj in scene.objects: … (but that might me performant heavy)
Or have a script in each object with an always sensor (true level triggering with freq 10) check the distance? (im thinking always sensors in each object might be performant heavy)
Or is there an alternative?
Maybe a script in each object not with an always sensor (near sensor doesnt seem to work for me - only activates if player is in the upper hemisphere of the near sensor sphere)
or something like: for obj in scene.objects that are in a sphere with a 50 radius