I’m planning to use raycast hit-detection for my client-sided projectiles to detect if they hit eachother but I do not know if it’s even possible or not. if you know some answers to this question, please let me know : )
rays cant detect another ray but you can place a part along the path of the ray and then the second ray can detect the part that you placed along the ray
this video will show you how to position and rotate parts to go between 2 positions
the part you want starts at the timestamp of 28:11
you can set the parts transparency to 1 so the part is invisible
what if i just make an invisible projectile on server and a fake visible one on client instead? the server-sided invisible projectile will still use raycasting hit detection and it can detect other invisible projectiles coming across its way
and both the server invisible projectile and client projectile can sync in same speed
That sounds like it should be fine
I tested out this method and here are the results:
Black Box = Server-Sided projectile
Sparkles ball = Client-Sided projectile
if the projectile detects another projectile, it will explode particles in a 𝗹𝗮𝗿𝗴𝗲 range.
if the projectile detects anything other than a projectile, it will explode particles in a 𝘀𝗺𝗮𝗹𝗹 range.
Here’s the video (sorry for laggy recorder fps):
Long story short, it worked!
(And the server-sided projectile is supposed to be invisible but it is represented as a black box so we can visualize where it is)