Currently just testing around with hitboxes, currently on the client, Is it possible to shorten the distance where the player gets hit/killed from? I’m aware most of it is primarily ping/network issues but I noticed some games have a shorter margin then others.
Or perhaps there’s simply just a better way to do it?
It’s possible to use some vector algebra for that. Essentially, you try to find the nearest player (hitbox) to a 3D line (your flying knife). If the distance is close enough, it can be registered as a hit.
You can find tons of resources on this particular problem (just search up “nearest point to segment”), but here’s one to get you started:
While this will be useful in the future for me so thanks, I was referring to the distance between two players on one client to another,
On one you will be very close, and manage to kill them during a knife slash
but on the other, you can be anywhere from 5 - 15 studs behind and still kill them, how can I shorten this gap if possible?