Collisions are not accurate

I’m finding that collisions are inaccurate - is this normal?

Screenshot below shows a pair of aircraft wheels - one wheel has a capsule collider which covers both wheels. The ground is a box collider (but it also fails with a meshcollider, too). The screenshot shows where OnCollisionEnter is firing, with the wheel still 0.02 away from the ground. Doesn’t sound an awful lot but in my game scale, it’s almost half the height of the wheel itself and is very noticeable.

I tried various collision methods (continuous etc) but nothing helped.

Other than scaling everything up to make this less obvious, is there another way around this?

Typical - post on a forum, find the answer five minutes after (sort of).

I discovered I can change the “Default Contact Offset” in Physics Manager. It was at 0.01, I’ve changed it to 0.001 which all but eradicates the problem.

Is this a wise thing to do?

Nobody??

It’s a fairly unwise thing to do, in that the physics engine is expecting units to be meters by default.

It sounds like your game scale is pretty small if that’s meant to be a full-size aircraft?

(Other systems have defaults that make sense for meters too, i.e. camera settings, so it’s worth standardizing)

1 Like

Yeah it is pretty small - reason being that I started playing around with Unity 4.6, which imported everything at 0.1 scale (or was it 0.01? Either way I never understood the logic of it). Switched to Unity 5 and it imports models at a scale of 1, so I sort of adapted the models to fit the code instead of the other way around.

No biggie though, I guess.

You can always just change the import scale. There’s no reason to leave it at 0.1 if that doesn’t get the results you want.

–Eric

Sure, though from memory, there was no way of changing the default value so everything had to be altered on a per-asset basis, and as I said, I never really understood the logic of importing everything so small. Admittedly I’m no Unity guru so may just have missed something.

But it’s a moot point really as I’m on Unity 5 now which defaults to 1. :slight_smile:

You can select all the assets and change them at once.

–Eric