# Asteroid Field Physics

I’m making a space 2.5d shooter similar to r-type delta or g-darius.
Managed to snap all of the action into local space relative to the camera, so the camera can fly around the level and all the action (enemies, projectiles, players) follow the camera as if there was just a movie playing in the background.

What I want to do next though, is have an asteroid field where the player’s ship can push asteroids out of the way (they’re small). I will also have falling debris and things in the future that will need to bounce off the ship.

The problem I have currently, is that when I fly into an asteroid, the won’t fly away or move away, they just kind of crawl away from my ship, and when my ship stops moving, the asteroids stop moving as well. My understanding is that if they both have colliders, with gravity turned off, and the ship is moving in transform.translate methods, that when I push the asteroids, when the ship stops moving, the asteroids should still have “momentum” and keep flying away.

I’ve frozen the z axis so the asteroids all have this effect on a x/y plane, so that it fits the 2d ness of the 2.5 game, but they still don’t carry momentum after being hit by the ship.
Any ideas?

Nothing is kinematic except the ship, gravity is off, and nothing is set to trigger.
I notice that when I push one asteroid with my ship into another, the asteroid that is hit by an asteroid WILL float away like I want it to. I’m just getting confused x_X

Edit: Also forgot to mention, that when I move an asteroid into another asteroid using my mouse in the inspector panel, and just move them into each other like the ship’s movement is done (with translate) they don’t bounce anymore, and they just push off each without carrying through their momentum. Is this because if I don’t do acceleration or actual movement with the ship, and only modify it’s translation +speed*delta.time it won’t work?
How would I give my ship an acceleration/speed type movement, that would add kinematic based movement to push things and give them momentum?

Lowering their mass would make them easier to start moving, and lowering drag would make them move for longer before lumbering to a halt.

Technically in space there is no drag and nothing would ever stop moving, except that objects get constantly bumped into by miniscule asteroids, and even particles. (Photons CAN stop a moving object. Radiation pressure, look it up).

``````rigidbody.velocity = Vector3.zero;

case shipState.MOVINGUP:
rigidbody.velocity += Vector3.up;
break;

case shipState.MOVINGDOWN:
rigidbody.velocity -= Vector3.up;
break;

case shipState.MOVINGLEFT:
rigidbody.velocity -= Vector3.right;
break;

case shipState.MOVINGRIGHT:
rigidbody.velocity += Vector3.right;
break;

rigidbody.velocity = rigidbody.velocity.normalized; //to prevent faster diagonal movement
rigidbody.velocity *= speed;
``````

–David–