I have an issue with a mechanic in a game I am working on. I attached a crude diagram I made in paint to help me explain my issue.
Blue Box - Dynamic Box
Black Box - Static Box
Red Arrow - Gravity
Yellow Arrow - Force from black box
Green Circle - Rang of Yellow Arrow
First diagram shows the blue box at rest being pushed down by gravity.
The second diagram shows what happens when the black box turns on it's opposing force.
The third diagram shows where I want the blue box to eventually come to a rest.
What currently happens is when the opposing force is kept on, the blue box goes to the highest point possible then falls all the way back down to black box and will continue doing that until the opposing force is turned off. I want the box to slowly level out and hover (like diagram three).
I am just looking for ideas on how you might handle it. Nothing I have come up with has worked.
P.S. - I am doing this in XNA using BEPUphysics engine.