Restricting objects to 2D movement

I am looking for a script to restrict any object under the effect of the script into 2d movement, Y and X being the axis, most of the object will have rigid bodies but i don’t think it should effect anything too much.

Have you taken a look at the 2D Platform tutorial? Should have everything you need.

~t

I’ve had a look and well i’ve no idea how it’s done, any help ^^?

The PDF explains things pretty well. Make sure you read through that. Also, if you notice that every object in the scene that isn’t Lerpz that you interact with have a ConfigurableJoint component applied to them. That component lets you restrict both linear and rotational movement. So in that platform tutorial the objects are limited on Z-movement and X,Y-rotation.