Wheel Roll by Position

Automatically spins a wheel as it moves across X so there is no slip.

Code

var r = thisLayer.width / 2; // radius in pixels
var rot = -transform.position[0] / (2 * Math.PI * r) * 360;
[rot];
rotationphysicswheel

How to Use

Paste on Rotation of a circular layer. Animate X-position; the wheel now rolls naturally.