0
votes

I have trouble finding out how much i have to change the velocity of a object if a force in newton is applied to that object:

enter image description here

What i have:
no gravity or other forces
deltaTime - Time in seconds since the last tick
v - the velocity of the object in units/second
m - the mass of the object in kg
d - the direction of the applied force

What i want to do:
for the time of one tick (deltaTime) i want to apply a force of x Newton in the direction d to the object. Actually i want to change the velocity of the object accordingly.

What i did:
I tried to come from 1 N = 1 kg * m/s2 to the change in velocity but i am a bit lost since i can`t figure out how to verify my assumptions.

Update What i actually need is to now the acceleration caused by the force during deltaTime so i can calculate my new velocity by adding the acceleration like this: newVelocity = velocity + accelerationCausedByTheForceInNewton

1

1 Answers

0
votes

See also: https://en.wikipedia.org/wiki/Equations_of_motion#Uniform_acceleration

Assuming a coordinate system (x and y directions), you can separate these... your direction d will have x and y components, as well as your velocity and acceleration. In your picture the acceleration is "straight down" (ax = 0), and your velocity is "only to the right" (vy = 0), but I doubt you can assume that at all times, so I won't. These split everything into x and y components:

x1 = x0 + vx0(t1 - t0) + (1/2)(ax0)((t1 - t0)**2)
y1 = y0 + vy0(t1 - t0) + (1/2)(ay0)((t1 - t0)**2)

also, new velocities at t1:

vx1 = vx0 + ax0(t1 - t0)
vy1 = vy0 + ay0(t1 - t0)

So... your new x location is (1) the initial x location, added to (2) the x-component of velocity times delta-t, added to (3) half the x-component of acceleration times delta-t-squared. This can be simpler if, as in your picture vx = 0 and/or ay = 0, but the above equations will work for the general case.

PS, based on F=ma, if you only know the force F going in, then:

 ax0 = Fx0 / m
 ay0 = Fy0 / m