1
\$\begingroup\$

I'm making a multiplayer game. For now, I added a script to towers and I have booleans to change using OnTriggerEnter.

When triggered, client sends a message to server and towers health starts to get lower. So it works.

But I don't know if it's safe to use OnTriggerEnter because it calculates on the client side. Should I calculate on the server side ? And how I do it ? (Using Physics.ComputePenetration is a little bit slow.)

\$\endgroup\$
  • \$\begingroup\$ Based on your mention of the OnTriggerEnter and Physics APIs, it sounds like you're using Unity, so I've added the appropriate tags to your question. If this is incorrect, please make the appropriate edits so it's clear what tech you're using. \$\endgroup\$ – DMGregory Jul 14 at 15:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.