Hey! I just wanted to showcase my shadow detection system. I know it seems broken, but i had to dial down the settings for the video since Roblox’s capture is not the best. The way it works is:
It has 5 positions it checks on the player: Left Foot, Right Foot, Left Upper Arm, Right Upper Arm, and Head. These 5 encompass most of the player. Then, it detects the nearest light source which has an effect on the player, taking into account the light’s range, angle, normal, and its parents position and orientation, does 5 raycasts pointing to the light, and if any of those return the light’s parent, we know that that part is in the light’s range. From there, we can color the player’s highlight. For the video, I was only raycasting from the HumanoidRootPart to do less calculations.
robloxapp-20240701-1847058.wmv (5.4 MB)
This is just a simple mockup, and I want some feedback on how I can improve it, both in terms of quality and performance. There are two issues I want to bring up.
-
What do you think are the best 5 player parts to check, to balance between playability and realism?
-
Need to bring awareness to the need of customizing individual graphics settings, since the shadows are not visible if the graphics are lower than 5, and aren’t visible at a noticeable distance until 9.
Thank you for any feedback. If anyone needs the code for further help, please ask and I’ll gladly provide it.
EDIT: It doesn’t have to be 5 parts. It can be less.