• Content Count

  • Joined

  • Last visited

About Cawrtz

  • Rank

Contact Methods

  • Twitter
  1. Hello, I would like to know if it is possible to visually debug constraints when using P2JS (springs, revoluteconstraints, distanceconstraints, etc.) I found this image of box2d debug to illustrate what I mean Thanks in advance for any advice!
  2. In your State :, 0, width, height);with width, height the dimensions you wish for your world. then in the update loop :;The world will scroll to keep the sprite on the screen.
  3. Hi drhayes, thanks for your answer! I used scale instead of my width and height calculations Unfortunately, it stills affects the physics body... Maybe I could use another (visible) sprite that follows the (hidden) sprite body to bypass the issue?
  4. Hi I would like to tween my sprite when it falls on a platform to make it look like a slime (increase its width and decrease its height, then back to normal). The problem is that I've enabled Arcade physics on it, and the body (body.width, body.height) is always adjusting to its visual size (sprite properties .width and .height). game.add.tween(this).to({ width: currentWidth + 10, height: currentHeight - 10}.onComplete.add(tweenBackToNormalSize);That creates opportunities to glitch underneath platforms and many other unwanted side effects. Is there a way I can get this effect without changing the hitbox ? Thanks in advance! Yann
  5. Yes, they are static. Adding[0].sensor = true;worked like a charm. I even avoided using a body callback, which would have lowered performance Thanks a lot!
  6. Hello everyone, I would like to detect a collision between a powerup and a player, both are P2JS bodies. My problem is really simple : I don't want the player to physically "hit" the powerup and get slowed down Both bodyCallbacks and onBeginContact() have this issue, even if I remove the powerup immediately after the contact (which makes sense according to the docs that says it's fired after the step so the collision already happened) Is there a simple way to avoid that and just detect the intersection between the bodies ? Thank you in advance! Yann