• Content Count

  • Joined

  • Last visited

  1. I have a character, that jumps. The velocity of the jump is based on how long the player holds a button. When the player is holding the button the velocity is increased. Upon releasing the button the player jumps with the velocity calculated while the button was held down. The X and Y velocity is always known. How can I display an arc based on the X and Y velocity of the character, showing the player how far the character will jump?
  2. Hello, I was wondering if it's possible to dynamically add a lamp? I was being naive and tried to just simply remake the dark mask when I added a light, but this doesn't work. You can see my attempt at: http://www.pixelshader.co.uk/illuminate/ - Run right, press E on the torch and it doesn't work as expected. Thanks for any help
  3. Wahooiy

    P2JS Overlap

    Not really no. I'd like a P2 Version of the arcade.overlap. I'm not sure how to create a P2 collision group and then test if the player is overlapping it.
  4. Wahooiy

    P2JS Overlap

    Not necessarily, I want to be able to say: if button pressed if colliding with object
  5. Wahooiy

    P2JS Overlap

    I am currently using P2JS to handle collisions within a platform game I am making. There are objects within the objects layer in my level that I want to be able to interact with (Standing over it, press button, do action). How can I create a collision overlap function like in Arcade physics?
  6. Ended up changing the physics system to P2 to solve these issues, with the help of: http://test.xapient.net/phaser/tilemapexample/index-p2.html
  7. I have started to make a game making use of illuminated.js and started with arcade physics (http://www.pixelshader.co.uk/illuminate/). I moved on to using tiles with more complex shapes and moved onto ninja physics to accommodate this. I managed to set the slope map correctly and the collision works but I have a few questions: 1. I cant seem to move up slopes. This can be seen when playing the game (currently a small test) when moving to the right. How can i get the character to move up the slope? 2. Is it possible to change the sprites AABB body size with ninja physics? (can turn on debug body using Q in the game) 3. With arcade physics it was possible to do 'body.blocked.down' to test if a sprite was on the ground, to test prior to jumping. Is something similar possible with ninja physics? Thank you for your help!