Variable change on collision unreliable

Hey everyone,

I’ve noticed this is a recurring issue, where objects moving rather fast (say, at a speed of 900), are meant to trigger a variable change on passing through another object.

It seems to not trigger a good number of times, especially when the system is under load and the frames are stuttering.

Anyone have any experience with getting around this?

Thanks!

The problem will most likely be that between 2 sequential frames, the object goes from one side of the collide-able object to the other without landing on it,

One way around this is to do a raycast from the object’s current position to it’s next position, and check whether a collide-able object lies in between the two points.

Ah okay, will give this a shot, thanks.

I also just tried slowing down the movement, from 900 to 500, and it seems to have fixed the issue. I tested it twice with 100s of objects and it didn’t happen a single time.

Just for reference in case someone has a similar problem in the future.