πŸ’¬

Community answer

Collected from the ACE community Discord archive around 2023-04-10. It may be informal or outdated β€” anyone can edit this page to improve it. This topic changes between game versions β€” double-check before relying on it. Original discussion

Collision listener firing multiple times due to server delay

πŸŒ™ LuaUpdated 2 days agoβ€’0 views
Add a guard flag inside the callback so repeat collisions in the same frame/lag window are ignored - curtime only updates once per frame, so you can also deboun…

How to prevent a collision callback from running more than once when the server reacts slowly

Add a guard flag inside the callback so repeat collisions in the same frame/lag window are ignored - curtime only updates once per frame, so you can also debounce by comparing curtime to the last-handled time.

Was this article helpful?

See More

Discussion(0)

No comments yet. Be the first to ask a question!

Have a question? Sign in to join the discussion.