• Content Count

  • Joined

  • Last visited

  1. This answer worked for me (answer I got from Stack Overflow) height = velocity^2 / (2 * gravity)
  2. In my mobile game, the main character needs to jump to a specific y point before starting to fall down again due to gravity. How could I calculate the y velocity I would need to reach (at peak) a given y position with a given gravity? I tried to do this with a tween instead of arcade physics because it was exactly what I needed (distance traveled over time with a gravity-like effect), but the performance was not good and was constantly sputtering. I'm currently using Phaser 2.6.2. Thanks!
  3. I have a ground as a static body (gamePhysics is my game physics I save globally) platform = gamePhysics.add.staticImage(gameCenterX, (boundsHeight * .5) - levelObject.platformYDifference, 'layerOne', ('Platform' + imageExtension)); platform.setOrigin(.5, 1); I have a character container that has gravity and is supposed to collide with the platform, but it doesn't act as expected. It seems to fall onto the platform and slowly pass through and then continue on after it passes all the way through. mainCharacterContainer = gameAdder.container(gameCenterX, 300); gamePhysics.add.existing(mainCharacterContainer); This is in my main update method gamePhysics.collide(mainCharacterContainer, platform});