Keep ship at Y = 0 in 3d space shooter, overhead camera

I have a space shooter (who doesn’t?) and it is 3D with camera locked over top of the player, looking down the Y axis. I have locked the Y at 0. The scene is bordered by a square made of 4 rectangles. All ships sit a Y = 0 and “fly” in the x-z plane. For single player mode, player starts at 0,0,0. I am using AddForce to navigate with A,W,S,D controls. When I collide with the wall, or other ship, it rebounds…but…the Y starts to change. Using box colliders. What am I missing if forcing the ships to always remain at Y = 0?

Reading through your post, i thought, that “heh, I never made a space shooter” then I realised, that i made one in xna
Well xou could freeze the y position in rigidbidy

1 Like

I have that checkbox checked on the rigidbody and it still starts to move on the Y after any collisions…