Summary

In this chapter, we learned why the client-side hit detection is very easy to hack. We saw how some games require the player to lead their targets to account for lag. We then learned how we can alleviate this by rewinding potential targets before performing hit detection, so that players can aim directly at their target as expected.

With this technique, in combination with the methods for server-side movement code discussed in the last chapter, you have the tools you need for nearly hack-proof multiplayer games which will boost your overall player experience.

Get Unity Multiplayer Games now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.