If I lower the force to 10, the issue is gone - the cubes start rotating and moving in appropriate rebound directions.
Is this expected behavior? If so, where is the threshold of velocity where the objects no longer have correct rebound/bounces?
…and is it stable enough, so that I can simulate collisions manually by applying forces once the velocities during collision are over a certain value?
When I tried applying a bouncy physics material, the results of collisions were as follows:
force 10 - started rotating and bounced off correctly in an angle
force 20 - no rotation at all and bounced off in exact opposite direction they were going
I’m creating a racing game where cars might meet head-on at speed and all collisions I get are cars stopping like the two cubes on screenshot. My only idea was to scale the whole world down, so that the cars move in overall much smaller velocities. But since also the colliders will be smaller, I’m not sure whether this has a potential to help.
Also, I tried all the collision modes and their combinations. Only continuous dynamic seems not to let the objects pass eachother, but has this drawback.
I just tested and was able to reproduce this. Continuous Dynamic seems buggy. Initially the objects didn’t stop as you described but glanced off each other, albeit unrealistically. So I tried adding a physics material with no friction and then the objects stopped exactly as you described. I then removed the physics materials to restore default physics and the objects still continued to stop dead on collision. Strange…
Try using Continuous Speculative. The collisions behaved as expected for me.
Hello zulo3d, thanks a lot for taking a look and confirming the issue!
I’m using Continuous Speculative as a fallback now, but got different issues with that - cars travelling in high speed in exact opposite direction but are not supposed to crash (are going for a near miss), collision happens even though there is visible space between the box colliders - no change to car direction but the velocity is reduced and collision event triggered.
Anyway, that would be for another thread I think, not to steer away from the topic.
Bump. I’d really like to get an answer on whether this is expected behavior or not. If it is, then I guess I’ll have to implement my own collision rebounds if combined velocity is large. If it is not, then I’ll try to submit a bug report.
Go back to using the Discrete or Continuous collision detection mode and decrease the physics Fixed Timestep. Just going from the default 0.02 (50hz) to 0.01666 (60hz) helped improve the collision behavior of the cubes.
Or adding a physics material to the cubes with friction values of 2 will result in the cubes spinning much faster upon colliding.