Hi all. First let me say thank you to the devs of this great library.
Second, can one of you physics gurus point me in the right direction to solve this.... In my app I have an ever increasing gravity (albeit slowly), and I have an object with an unchanging mass. Starting from the same rest point each time, I want to apply an impulse to the object that will make it reach the same height each time before gravity causes it to fall back down.
Example:
Gravity.Y is -2
A ball sits at point 0,0 and has a mass of 1.5
Impulse is applied and the ball makes it to point 0,100 before stopping due to the force of gravity
Ball falls back to 0,0
Gravity.y is increased to -4
Impulse is applied and the ball once again makes it to 0,100 before stopping due to the force of gravity
Ball falls back to 0,0
How do I calculate the impulse needed to do that? Thanks in advance!
Second, can one of you physics gurus point me in the right direction to solve this.... In my app I have an ever increasing gravity (albeit slowly), and I have an object with an unchanging mass. Starting from the same rest point each time, I want to apply an impulse to the object that will make it reach the same height each time before gravity causes it to fall back down.
Example:
Gravity.Y is -2
A ball sits at point 0,0 and has a mass of 1.5
Impulse is applied and the ball makes it to point 0,100 before stopping due to the force of gravity
Ball falls back to 0,0
Gravity.y is increased to -4
Impulse is applied and the ball once again makes it to 0,100 before stopping due to the force of gravity
Ball falls back to 0,0
How do I calculate the impulse needed to do that? Thanks in advance!