-1

When I Shoot a ball with force, if the force is faster than a number, everything goes well and the ball bouncing. but when the force is less than a number, it seems that bounce not works anymore and the ball move along the wall.

https://i.stack.imgur.com/LrNvm.jpg (excuse me that i couldn't upload picture here)

the green one is correct for me, and the red one not correct. I use physicsMat2D,

Friction = 0 and Bounciness = 1

BlackMB
  • 230
  • 6
  • 20

1 Answers1

1

There is a threshold for the speed in Box2D. Try changing the velocity threshold in Edit -> Project Settings -> Physics2D Physics2D Settings

The closer the value is to zero the smaller the impact can be to stil be counted as a bounce.

Community
  • 1
  • 1
  • Wow, thanks man, really appreciate the answer. the game is for mobile, which number you think is better for performance and solve my problem too? – BlackMB Nov 14 '17 at 08:40
  • Well, this depends on how many rigidbody2Ds you have in your scene. Below the threshold they will go to sleep (get no more physics updates). I would go with a value of maybe 0.1 and see if that creates the desirable result. – Johannes Deml Nov 14 '17 at 17:36
  • thanks again. I use 0.1 too, and i think it work good. Because i really need this feature, i think 0.1 is good for this project. – BlackMB Nov 14 '17 at 18:00