Massive FPS drops when camera is obstructed between a lot of NPCs / Humanoids

When camera is positioned / obstructed between a lot of NPCs / Humanoid, render frametime will spike and causing massive FPS drops
usage

Video Reference -

Repro File -
CameraScript Debug.rbxl (154.2 KB)

Expected behavior

CameraScript calculating the obstructed camera final position shouldn’t cause spiked usage on CPU as well as FPS drops

In real scenerio, it might be rare to have a lot of NPCs / Humanoids at the same place and same time but it might be possible for some wave-based survival games or even MMORPGs - This issue might cause severe performance problem under above circumstances :raised_hands:

7 Likes