Reproduction Steps
terrainContactBug.rbxl (49.6 KB)
If you try and make a physics part that has collision enabled, and collision grouped to collide with players but not the terrain you can do so, but the part will generate collisions and contacts with the terrain anyway.
This has a severe performance impact on my game, where I have a lot of small floating platforms (enemies and their sub parts) floating near terrain and are generating hundreds of contacts. They shouldn’t be generating any contacts at all as they’re set to not collide with anything via collision group, but still trigger terrain contacts.
I think I have correctly set the collision id on the terrain object in the workspace.
I have tried toggling TouchesUseCollisionGroups to no effect.
Expected Behavior
No contacts get generated when a part is in a collision group that does not include the collision group for terrain, but still has its collision turned on.
Actual Behavior
Contacts get generated for parts that have collision on, but are in a collision group that should in theory excludes the terrain.
Workaround
Yes, but actually no.
Setting the collision to completely “off” solves it, but I want these parts to be able to collide with the character and not the terrain.
So right now I can manually check the distance to the player locally, and turn collision off on distant parts.
This is, of course, yuck.
Issue Area: Engine
Issue Type: Performance
Impact: Moderate
Frequency: Constantly