Modifying the friction value in custom physical properties for cylinder and sphere-based vehicle wheels leads to physics instability and erratic behaviour when crossing surfaces made of multiple parts (regardless of identical physical properties and Y levels). This bug also makes the tires behave more erratic the faster you go, sometimes causing the tires to skip off the ground.
I have left an attached place that can be used to reproduce this issue, alongside a video showing two popular tire scripts for a popular chassis which change the friction values constantly, both with very different methods, experiencing the exact same bug (included in the place file).
I’m also getting similar issues, in my skateboarding game: go skate. - Roblox,
I believe it started happening in new servers about 3-4 hours ago. The most noticeable thing for me is I use a body gyro to adjust the skateboard to the surface normal of where players are landing. Now a lot of times the body gyro doesn’t work correctly and the players flip erratically.
As far as I remember, this has been happening for a couple years. In RCD, we use to get around this issue by faking “tire flex” by sizing up and down a cylinder collision part inside each wheel, other methods I’ve seen games use are really dampened springs, using mesh collisions for the map and also another one where they have each part of the road be very small, so there’s thousands of them, eg generating a wedge for each triangle in a mesh.
Hi @VanillaEdge
I’ve taken a look at your repro place and videos. Unfortunately this issue is caused by how our discrete collision detection algorithm works. There’s nothing we can do right now to alleviate the issue. Improving these types of issues is the subject of future work for the physics team. The good news is your suspension setup seems to handle everything quite nicely, well done :).
Seen as this wont be fixed anytime soon, are there any hacky alternative methods that we can use to get around this temporarily? This bug is gameplay breaking at high speeds, which is the norm for players in-game. We used to be able to use methods like faking “tire flex” which sized a invisible collision part in each wheel up and down but that is not possible for us anymore due to fading them out for various unrelated reasons.
Sorry for not replying as I have been and still am busy. While unioning helps reduce bumping, the 2048 size limit renders it largely useless due to our map size even when we are at that upper limit. There was also different degrees of bouncing depending on fps after a friend tested unioned roads extensively for me.
I’m considering disabling the wheel collisions from the assembly and instead making invisible collision wheels attached using mover constraints and a spring to the assemblies wheels cframe. However due to still being busy, testing if this will help will have to wait a couple more weeks.
Can you share some more information about how this bug occurs so I can devise more ideas for fixing this if my current idea does not work out? All help and ideas are appreciated.
Friction Multiple Parts Bug Union and Overlap.rbxl (333.5 KB)
Hi VanillaEdge,
This phenomena is caused by the discrete collision system we have and the penetration tolerances of collision detection. If you approach a boundary between parts the collision detection doesn’t see the neighboring part you are about to touch. I’ve attached a modified place file that unions the curve segments and overlaps the straight away with the curve section. This is my best attempt to remove and overlap seems between parts. In my local testing it behaved well in my opinion.
I have tested the place you provided, the issue is the union example there is too small.
If you increase the size of that union to its maximum size you will get 1/4 of the size of some of our highway turns and then you will notice how messed up the collisions get on that union which perhaps is an union issue and maybe not related to the physics issue but still if our only bet is to use unions then that option already gets eliminated for bigger roads.
Here is a 1/4 of a turn that i unioned with the same settings and it still bumps (The visible parts of the road are non collidable.)
I wanna mention that we do not use wedges to fill the gaps between parts, we have used archimedes plugin when we were making the roads with using block shape parts only!
This bug is seriously limiting for doing anything with the physics engine in Roblox, but here are all the methods that have been found since this post was created to get around the bug. I suggest you mix and match some of these methods, whatever suits your projects scope best. Roblox, please fix this bug
First here’s a summary of how the bug works thanks to SolenoidalField:
If you approach a boundary between hulls, the collision detection doesn’t see the neighbouring hull you are about to touch. Because of this, you will fall through the hull and then once a few iterations pass, the collision detection will notice the hull exists and then will try to push the physics hull out of it, causing the assembly to jump.
Method 1: Reduce map hulls
Because the crux of the issue is hulls, having less of them to transition between means there are less chances for the bug to occur in the first place. This method is pretty straight forward, find multiple parts side by side that could be turned into one big part with the same dimensions.
To show this method, here’s a picture of a corner on a track with many hulls side by side. You can set every part’s CanCollide property to false, then make one big invisible part with CanCollide set to true and have it cover the whole area. With elevation, you would have to be more creative with your part sizes and placements.
Because the bug occurs during transitions from one hull to another, another solution you can use is overlapping your hulls edges, that way the collision detection can find the neighbouring hull while still being on top of its current hull, so when it leaves its current hull, it knows the neighbouring hull exists and so it will not fall.
There are three easy ways you can overlap your hulls:
Unions: Unions generate convex hulls which generally tend to overlap; however, you are left to the fate of the hull generators whims.
Resizing parts: You can extend the side of one part to overlap with its neighbours; this requires manual work.
Generating in-between parts: You can make an invisible part that stretches across two parts edges; this can be easily scripted.
Method 3: Add some “give” to your physics assembly (hacky)
This method is weird and can make your physics feel wack but its surprisingly effective at reducing the severity of the jumps when crossing hulls. For example, to add some give to vehicle wheels, you can disable the wheels collisions, then make an invisible wheel at its position which is connected using mover constraints (AlignPosition and AlignOrientation) and a Spring (for enforcing a distance limit). This makes it so the wheel can move in 360 degrees and a little outwards instead of only linearly up and down (due to suspension constraints), thereby reducing the effective up force applied by the physics engine during correction, or at least that’s what I assume happens, all I really know is that it helps (mostly) .