• Content Count

  • Joined

  • Last visited

  1. Ok thanks, i'll repost my issue there so. I'd like to know why this is happening before switching to matter.
  2. Hello So, got an issue driving me nuts. Trying to enable collision between balls, I wanted to make a body group but issue popped out, balls want to slide on the others, it's kinda random, sometimes it bounces as expected, sometimes not. It seems related to the shape because without the circle hitbox collisions are okay. But it was working without the group so... var balls = this.physics.add.group(); balls.create(100, 250, 'blueBall').setDrag(0.975).setDamping(true).setBounce(1).setCollideWorldBounds(true).setCircle(200).setScale(.2).setInteractive(); balls.create(200, 350, 'redBall').setDrag(0.975).setDamping(true).setBounce(1).setCollideWorldBounds(true).setCircle(200).setScale(.2).setInteractive(); balls.create(100, 350, 'redBall').setDrag(0.975).setDamping(true).setBounce(1).setCollideWorldBounds(true).setCircle(200).setScale(.2).setInteractive(); this.physics.add.collider(balls); I had no issue at first without making the group, collision where perfect between two balls using this snippet : ball = this.physics.add.image(100, 250, 'blueBall'); ball.setDrag(0.975).setDamping(true).setBounce(1).setCollideWorldBounds(true).setCircle(200).setScale(.2).setInteractive(); ball2 = this.physics.add.image(160, 250, 'redBall'); ball2.setDrag(0.975).setDamping(true).setBounce(1).setCollideWorldBounds(true).setCircle(200).setScale(.2).setInteractive(); this.physics.add.collider(ball, ball2); If you have any ideas at this point...
  3. Finally found it. It's on the 'drag' setting of your sprite, you need to set "damping" to true and lower the velocity you'r applying. Explained here.
  4. bump. Spent hours trying to solve that. Can't find a solution.
  5. Hi, I've been trying to throw a ball in a fixed direction in phaser. GameObject.setVelocity(velocityX, velocityY); But, for instance, if Y is bigger than X the ball is not going to launch straight, and it'll finish its path vertically. (see gif for example). Is there a trick to do I'm missing ? Thanks.