# MoveTowards

Hi,

I have a bullet moving in the direction of a target location. The target location was defined by using movetowards. This works but when the bullet gets to the target location obviously it stops.

I want to define a target location but I want the bullet to move past the target location but in the same direction. Fairly new so please provide some basics on the easiest way to do this, help appreciated

you should check AddForce of RigidBody

In general, I dont use physics for bullets. I do the calculation of gravity or whatever I need in the bullet, and do a raycast to get if it collided. This means I use the forward direction of the bullet instead of a point to point movement.

You can also use the point to point reference to start your shot. so your pointing a few degrees off, and it still shoots at the target. In that case you want to start the bullet in that direction and then let it move forwards on itâ€™s own, doing the raycast as you go.

If you donâ€™t use physics and bullet drop, you could simply try the following:

1. targetPosition - bulletPosition and save the result, this is the direction vector
2. normalize the result so that you get a unit vector

Normalizing is not necessary in this case but helps you to control and tweak the speed of the bullet. If you multiply the normalized vector (=unit vector) by Time.deltaTime, your bullet moves 1 unit per second, additionally multiplying this buy X will move it X units/seconds

I assume that you donâ€™t want your bullet to move forever. So you must have a maximum distance it can travel. So:

1. Bullet start position and target location define a vector.
2. Normalize it.
3. multiply by your max dist. That is what you can move towards to. At the end it will still stop. Which is what i think you would want anyway.

orâ€¦

``````Destroy(bullet, 5);
``````

bullet only lives 5 seconds. if it doesnâ€™t destroy itâ€™s self, the game just cleans it up for you then.