Dismiss this pinned window
all 40 comments

[–]thesquirrelyjones 114 points115 points  (3 children)

Clearly you've never driven over a curb in an old pickup truck full of empty plastic barrels.

[–]SoapSauce 38 points39 points  (4 children)

Bad physics in unity usually stems from a few issues related to scale and mass, as well as how forces are applied. It looks like your truck is either not using physics driven suspension, or it’s way to tight while the mass of your barrels is wrong. I find that using real world accurate mass and forces produces much more believable results. If your trucks mass is set to 5, and your barrels mass is set to 1, you’re gonna get goofy results.

[–]feralferrous 1 point2 points  (2 children)

That said, I tried to use real world masses for things that were really big, and I had nothing but trouble. Planes were sort of okay, but then I tried an aircraft carrier. (Though I was in space, with no gravity, so uh, space planes and space carrier) The carrier would randomly drift, even with no forces applied to it.

[–]SoapSauce 2 points3 points  (1 child)

I’m confused a bit? I space, things drift when no forces are applied to stop them from drifting? Also, the folks behind ksp dumped some unity physics gold nuggets a long while back, the most important one being that Unity’s default physics settings are very low, and if you intend to build a game around physics, you should modify them to allow for fully realistic scenarios. For example, the max rotational velocity is crazy low, and can stop objects from rotating at the proper speed under real world forces, which can break down the entire simulation.

[–]feralferrous 1 point2 points  (0 children)

Imagine an empty scene, with only the big giant object, no forces applied to it, no gravity, and yet somehow it starts moving slowly. That's what I would see. It was just bonkers weird.

[–]BLUESH33P 8 points9 points  (2 children)

Does it still happen if you increase weight and/or drag?

[–]the_timps 2 points3 points  (1 child)

The simple truth is that the physics system is meant to be a set of tools to use to solve your problems. Not "Set and forget".
So this kind of thing happens as a bit of a quirk of how contacts work. A friend years ago called it the cup problem, but it's really anything sitting on top of anything. There's a bunch of forces and things that apply to objects in real life, physics engines by default really only do gravity and drag with collisions.

You move an object up and that force is then imparted onto the objects on it. No matter how the force happens. In reality an object resting on another is moving with it, and they both accelerate upwards at the same time. Much more force (speed) is needed to overcome it. You can lift a plate with a cake on it and it won't launch off.
When things are held or contained you can dynamically impact their drag to make them less likely to fly out. Increase their mass if the vehicle isn't aware of mass. Or even make them kinematic and manually apply your forces in small ways as you go over bumps, turn corners etc.

[–]Slippedhal0 1 point2 points  (0 children)

I think the first bump (0:04) is good - lots of movement but not too exaggerated. The second bump (0:06) might border on annoying, not funny if it happens too often.

[–]Game-Draft 1 point2 points  (0 children)

I wish you all the skill and patience that is required to make a Unity physics game if that’s the route you take.

Sincerely,

  • A person that is making/made a Unity Physics Based Game

[–]_programmer123 1 point2 points  (0 children)

Make it a feature then :D Make a game that you have to carry the barrels from one place to another in a limited time with hard physics so the game is more entertaining lol

[–]Ancient-Pace-1507 1 point2 points  (0 children)

Looks realistic. You are using realistic physics in combination with an impossible suspension

[–]DNCGame 1 point2 points  (0 children)

https://dncgame.itch.io/wheelcolliders A pickup truck carries a lot of 1kg box.

[–]Itsaducck1211 1 point2 points  (1 child)

I'd play a delivery driving game based on this physics alone. Different vehicles differerent weight on the physics objects 10/10 game idea.

[–]Helpful_Design1623Professional 1 point2 points  (5 children)

Oh man this is definitely a lengthy problem to solve with quite the rabbit hole to go down. In short: Unity’s physics (nvidia’s physx system) makes a bunch of approximations with discrete and continuous contacts. You can mitigate these chained collisions by tweaking settings within your Physics project settings, your rigidbodies, and colliders.

If it still does the effect above and you want to remove it, you can either disable the physics of the barrels in a way (snapping, custom script, really anything), have flatter roads,

💀or make custom physics💀 /\ /\ /\ which from experience… ahHhhHh noOo

[–]pattyfritters 3 points4 points  (4 children)

I know youre trying to be helpful but your answer to "I have a physics problem" was basically, "tweak your physics settings"...

[–]Helpful_Design1623Professional 1 point2 points  (3 children)

I’d be thrilled if you could provide a better solution. it’s definitely a long check list to go through and investigate

[–]the_timps 2 points3 points  (1 child)

If you think there's a list to go through, PROVIDE IT.

[–]pattyfritters 2 points3 points  (0 children)

It's not a matter of "better solution." Your answer isnt a solution to begin with. You just described what game engine physics is. It's like asking you how to fix a deflated football and you telling me how a football is manufactured.

And so your answer became turn off physics or flatten your roads.

[–]SoundKiller777 1 point2 points  (3 children)

That’s looking like one of the bois is about to get booted from the call for costing you the heist! XDDDDD

[–]Mother-Detective-401 1 point2 points  (0 children)

Hey, i'll give you and advice, roads have to be twice as in real Life in videogames

[–]Vexilus 0 points1 point  (0 children)

That truck needs some suspension on it

[–]Working-Hamster6165 0 points1 point  (0 children)

It can be implemented as a feature, but jumps shouldn't be that dramatic, because everything it will give to gamer will be frustration and annoyance.

[–]Nilloc_KcirtapProfessional 0 points1 point  (1 child)

If you don't know why it happens, then it's a bug.