Smooth movement along an uneven surface

Hi,

I’m experimenting with moving a round object along various curved surfaces (circles and bends, etc). I’m using the method of raycasting to get the surface normal and then inverting it and using that as either a downward force or setting gravity in that direction (after normalizing/multiplying the vector). Both work ok but since I’m using polygons, the round object kind of bumps along the surface (see picture).

Using gravity I got smoother results but I was wondering if there were any other solutions apart from maybe a smoother collision mesh?

Here’s some pictures using the trail renderer to show the bumps.

With Force
[8449-screen+shot+2013-03-01+at+14.10.47.png|8449]

With Gravity
[8450-screen+shot+2013-03-01+at+14.38.39.png|8450]

Hi, yes that possible (and I’ll try that for the completely round platforms) but some platforms are L shaped (like a pipe curving upwards) so their centre will be in an odd place. So that won’t work for that.

Yup, I’m using a sphere collider but even that is not perfectly round (at least it’s not visibly perfectly round in Unity). I zoomed in to see why the bumps were happening and the sphere actually goes though the surface of the ‘planet’ just a little bit after each face. I’ve fiddled with the physics properties but nothing makes it any better. I guess what happens is that after each peak (the angle difference between each face) the sphere realigns, via the normals calculation and then pushes back into the ‘planet’. Maybe if I play around with the strength of gravity it won’t be so obvious. The Sphere (moving object) is 1m size btw, if it makes any difference.