like this, im using 8 direction instead of physics, moving green with arrow keys and blue wasd, this is 160 objects at 65% cpu for my pc, its my limit before i lag so maybe 80 is a good limit. theres prolly better ways. but its fine my game wont have so many enemies and slopes to raycast with, and flat ground i can turn off raycast
https://www.mediafire.com/file/75kh85qdyix8/1212313.c3p/file