Should touched events be handled on the client or on the server?

I’m thinking like if u have a car crash game and u want the server to feel smooth then u should have the touched events on the client is this true?

Getting into more advanced programming you should handle your detection client side, but I would opt in for either raycasting or magnitude over touched. If you aren’t that advanced you should keep it server side. Attempting to put it client might end up causing more lag if you don’t know what you’re actually attempting to do. However just because its server side doesn’t mean it’ll be bad on performance. You can get really good detection scripting only server side. Something that I would suggest is to evaluate your code, attempt to look at parts that repeat constantly and see if you can limit to how large your code is. Also just a general tip always simplify your code before making it more detailed. Meaning get the bare basics of what you want to happen before you try to make cool effects such as camera shaking or explosions. If your goal is to have a car that can crash into stuff then you really wanna spend time perfecting that before working on any slight details that would help.

5 Likes