How do I make an object stay put? I'm a noob

I’m by no means a game programmer but I figured I test out Unity3d as a hobby.

I created a turret in a game I’m building… I gave it a box collider and a rigidbody.
I wrote a simple follow script so the turret follows the player…

That all works fine… But if I hit the turret with the little space ship I made… the turret rocks back and the space ship flies in the air…
(Ship has rigidbody and box collider as well)

If I set the freeze position and rotation on the ship and the turret at the same time… the ship just passes right through the turret…

Is there a way to:

  • Place an object on my plane
  • Add a rigid body to it
  • Add a collider to it
  • When my ship collides with the turret… nothing moves… except for my ship coming to a stop?

Seems like this shouldn’t be as hard as it is…

The turret shouldn’t have a rigidbody; those are for moving objects (rotating doesn’t count as moving).

–Eric

Eric,

Thanks for the quick response…
But without a rigidbody my bullets will pass right through the turret…

That’s not correct.

–Eric