Hello!
I have a problem that has been accompanying me on several projects.
No code needed to explain.
I have an image (game character) stopped and I need to apply a Linear Impulse to simulate a jump.
Object: applyLinearImpulse (xForce, yForce, bodyX, bodyY)
Is there any way for me to know what will be the highest point reached by the image based on the force I apply on the Y axis? In other words, how much the image shifted on the Y axis to the applied force.
My biggest problem is that this image is tailored for every screen resolution. So this influences the size of the image and then the mass of the object. So the force that I need to apply so that it always reaches the height of the obstacle varies according to the screen.
Is there any way to calculate which force should be applied so that the image moves a specific pixel value, based on the gravity, mass of the object, etc?
Thank you!