GetTouchingParts not working properly after a recent update

Woke up today to a problem with over half the vehicles in my game suddenly not working like before. I did some research around this and found the problem to be the GetTouchingParts() function not detecting all touching parts of an object like before, all vehicles in the game have all parts collidable by default, and when they’re spawned i’m using GetTouchingParts to find what parts are in the way of the wheels and set them to CanCollide false. Due to this bug most vehicles can’t drive any more and other destruction physics that relies on GetTouchingParts mostly doesn’t work either. But this bug doen’t happen with all parts, so far i have only found combinations with unions that don’t get detected.

Here is an example where running the code for _, v in pairs(workspace.RR:GetTouchingParts()) do print(v) end prints nothing even if a union is touching it: (And they are both CanCollide = true)

(RR being the black sphere)

You can even increase the size of the ball to (2.5, 2.5, 2.5) and it still won’t be detected CollisionDetectionFail.rbxmx (5.5 KB)

This doesn’t happen with all unions and this combination randomly starts working at some point after having it in studio for a while. But if i delete them, insert the car i took them from and take these exact parts again it won’t be able to detect again.

And as mentioned this started happening recently, i can’t tell exactly but yesterday it worked fine.

4 Likes

This is weird. The level you gave me seems to have a broken Union (the C-Shape part). When I enabled ShowDecompositionGeometry the shape didn’t show me anything but the visual geometry, which means the code that tried to read the collision data stored on the part broke.

When I forced a re-decomposition by switching CollisionFidelity to something else and then back to Default, everything worked.

Let me test a theory.

2 Likes

Theory failed. Something got enabled yesterday that I thought was responsible, but turning it off didn’t help.

When was the last time you tested this part? I’m trying to figure out what could have happened to corrupt the Physics data.

1 Like

Looks like this might be at fault.

2 Likes

Yeah that must be it since i’m adding my vehicles to the game with InsertService. But the corrupted union in the example still interacts with other parts in the car like the wheel parts, causing it to not be able to drive. It seems like it just doesn’t get detected by GetTouchingParts.

EDIT: Tested the game now and it seems like that patch fixed the problems :+1:

Sounds good. Apologies for the issues it caused. Thank you for reporting it here.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.