# Unity 2D Current object force

I'm working on a game with an entity firing a shot. This shot could destroy other entities as well as the entity who generated the shot. My first step was to apply a force to the rigidbody2D of the shot, but when my entity is too fast the shot destroy it (the speed does not match).

I tried adding the speed to the force but the values mismatch by far (the force is a vector of like 150 magnitude, whereas the speed as a magnitude of 1).

I wonder how one can achieve this, to add the current speed of the entity to the shot fired, and i wonder if there's any litterature concerning the way physics is actually handled in Unity, i find very little documentation on the Physics.

Thanks.

For a one-off change of velocity, I'd recommend changing velocity yourself. So rather than applying a force to the object, try something like rigidbody2D.velocity += shooter.velocity after you create the shot and figure out the regular shooting velocity.
• Don't worry, it's not a dirty hack :) Basically, you know how fast and in what direction the bullet should start off. So make it go that fast and in that direction. Acceleration = Force / Mass is all that's happening internally when you apply a force, and acceleration is just a change in velocity. So don't be shy about directly changing velocity for an instantaneous effect. If the intended change is continuous over time, however, then you've gotta be more careful and rely on AddForce() if you're not certain you have the maths covered. Apr 18, 2015 at 8:44