Rigidbodies on moving platforms

In our 2.5D platformer, we have a large number of rigidbody physics objects, and use rigidbodies for characters, including players.

So, in the spirit of good platform-style games, we added moving "elevator" platforms.   How hard can this be, right?

Bunny rides platform.  Box rides platform.   All is good!

Bunny rides platform.  Box rides platform.   All is good!

Well, tricky enough.   Vertical elevators worked - sort of.  The rigidbodies vibrated on them.   But horizontal elevators  were a fail.  Some rigidbodies would stick and ride, others, well, not so much.  Players and enemies sliding off.

Adding a rigidbody to the elevator made things more odd.  Objects falling through, sinking into the platforms, not the behaviors we were looking for.  

So off to Unity answers!   The most recommended solution was to make the rigidbody become a child transform upon collision in script.   This is a real pain, as we have many different objects that would need this script.  And some character objects ride in other objects, which get tedious.  And we have to tag all the platforms, which makes adds complexity to making cool dynamic elevators in-game.

Then I noticed the solution recommend by HNX at the bottom of the thread below.   PERFECT!  Works great.   Just be sure to make your elevator kinematic and move it in FixedUpdate!

From http://answers.unity3d.com/questions/167404/rigidbody-on-a-platform.html:

Moving using only Rigidbody.MovePosition and Rigidbody.MoveRotation in FixedUpdate fixes the slipping and gives a very smooth and accurate simulation.
From the docs: http://docs.unity3d.com/Documentation/ScriptReference/Rigidbody.MovePosition.html
For kinematic rigidbodies it applies friction based on the motion of the rigidbody. This lets you simulate moving platforms with rigidbodies sitting on top of the elevator. If you want other rigidbodies to interact with the kinematic rigidbody you need to move it in the FixedUpdate function.