Collisions are often detected one frame late

When a part collides with a CanCollide = false object, there’s a chance the collision, and subsequent touched event, will be fired 1 frame later than when the parts visually intersect.

This issue also occurs with objects that are CanCollide = true.

TouchedBugReportRepro.rbxl (51.3 KB)
The repro I’ve attached demonstrates this issue: There is a ball which falls down repeatedly into a red CanCollide = false part. When the ball’s touched event is fired, the ball is anchored. On every heartbeat, I check to see if the ball is colliding with the red part by using GetTouchingParts. If the ball is colliding with the red part, I set a variable to true. If that variable is true when the touched event is fired, it means the touched event was fired one frame late. Every time the ball touches the red part, I print to the output whether or not the touched event was fired late.

Expected behavior

I expect collisions to resolve properly when the parts are visually intersecting, and for touched events to be fired with no frame delays.

5 Likes