I have an object falling at velocity V with mass M. I want to know the force needed to make it’s net velocity in the Y direction 0. I know I can just make the velocity 0, but that would be unnatural, and wouldn’t allow the object to hit the ground of it does not react fast enough.
I want this information so I can make a hovercraft that constantly stays around a meter off the ground. All the equations I’ve looked up either need a dt or a dx, and I want this to be instantaneous.
And if this just doesn’t work, how else would I keep a hovercraft from touching the ground through a physics simulation?
From the sounds of the hovercraft, you’re making it perpetually fall, which means that you need some amount of upward force to hold it in place. To me, to keep it 100% stationary vertically you’d need an upward velocity that is equal to the downward velocity. Basically you would take the calculated (or set) downward velocity, and then have that velocity applied upwards to it. For a more hover up-and-down effect, you could decrease and then increase the force by a small amount at set intervals.
The only other way I can think of is an upward force acting on a very heavy object just enough that it can just barely get off the ground, but never enough to keep it up in the air.
Maybe some variation of the above? I’m no physics major, and I’m not 100% familiar with the engine’s physics systems, but to me the above makes sense.
Haven’t tried it, and my physics classes haven been over way too long by now…but in theory it should be something like this to make the object stop within one frame:
Apply a force of -gravity (to compensate gravity) + mass*(-velocity)/Time.fixedDeltaTime.