# thruster-like 2d movement

I want to make a simple game with Spore-like movement for my player character (first stage, "cell"). For thosue unfamiliar with that game, it's in complete 2D, user point and click direction he want to move, then character model rotate its "front" to that point and then follow the pointer until mouse button is released. Two major questions here are: 1) how can I make usual physics stick to 2D in all movement, collisions, etc; 2) how can I make smooth rotation and movement (with a bit of inertia). I'm quite new to Unity, so few examples of scripting something similar would be excellent. I've tried to modify standart DragRigidbody script to my needs, but I feel that it's not exactly right for this purpose, but maybe joints are what I need. JavaScript and C# are both welcome.

1)You can add a plane or terrain across the scene and have the camera look down the y-axis, gravity should keep everything on the same level, you might also try putting an invisible collider across the top of everything to form a low ceiling maybe. Putting the camera into orthographic view makes for a 2D effect.

Better yet use a configurable joint to restrict movement in one of the planes and your objects will always be in 2D movement.

2)If you are using the built in physics engine then you can use the drag variable of the rigid body for inertia, angular drag also slows down spinning motions. Use rigidbody.addforce for thruster like movement. There's an add torque function as well but it's easier just the manipulate the rotation directly.

Here's a 2D game tutorial complete with assets

Whenever I’m making a Rigidbody that’s supposed to operate is 2D I just go into the Rigidbody’s constraint tab and click on Y in “freeze Position” then X and Z in “freeze Rotation”

This stops the object from moving up and down plus halts rotation coming off the plane. If it’s not a Rigidbody then you can just set position.y = some fixed value and rotation = fixed except yrotation