How To Transform Position of an Object after Collision?

How do I transform the position of an 2D object under gravity after it collides with an enemy.

The enemy is perpendicular to the ground above the game object with static gravity fixed in a position. When I shoot the object towards the enemy.

i want the game object to destroy the enemy (I figured this part) then take the position of the enemy in a static position until I shoot it again in the perpendicular direction.

You can set gameobjects’ positions by using [gameobject].transform.position = [desiredPosition]. Gravity will cause it to fall though. To disable gravity on a Rigidbody2D you can use [rigidbody2d].gravityScale = 0.