Hi there i am trying to make a bomb indicator that shows where the bomb will fall.
sth like this: (sorry for lowres pic)
so when i drop a bomb it has some velocity from the beggining, the drag and gravity starts to act (sam efor the lift but i don't mind with it for now)
but before i show you my solution i want you to read the main movement code:
t3dpoint WeightForce = Normalize(-pos) * Q;
t3dpoint DragForce = Normalize(-vel) * (DragCoeff * ((1.250 * squareSpeed)/2.0f) * 0.760f);
t3dpoint Acceleration = (WeightForce + DragForce) / Weight;
pos = pos + (vel * dt);
vel = vel + (Acceleration * dt); //where dt is time between frames
so i thought i should make a fast iteration to the surface -
while (bomb_didint_hit_the_surface)
{
set dt to 1 second
calculate all forces
calculate new position
make a ray from now position to new position and check if i hit the surface with this ray then i return;
}
it would look like this (every red line is one second interval i hope you get the point
Is there any easier way to determine the falling point?