x


Getting realistic bounces using physics materials.

Hi,

Im trying to set up am object spawning gun to fire spheres that will then bounce off all the walls accurately.

Unfortunately, if the angle is any more mild than about 70 degrees, the ball just slides along the wall that it has collided with.

The settings of the wall and projectiles physics material are...

-- Bounce on 1 all frictions on 0.#

-- 1 mass, 0 drag and no gravity or Kine.

Can anyone please suggest a solution, or alternative.

Thanks, - Graeme.

EDIT: Additional info.

" I should probably mention though that I'm trying to simulate ball physics like these - http://tanktrouble.com - I think the problem is that when the angle gets to low, the physics think it should roll across the surface instead of bouncing away at the correct angle. so what I really need is a solution to get my ball physics down to pure bounce, for total reflection of the initial angle - Any suggestions please? Thanks "

more ▼

asked Apr 16 '11 at 11:29 PM

Graeme P gravatar image

Graeme P
33 18 21 25

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

All frictions are too low, that's probably your problem right there. It's a pretty common question people ask, wondering why their ball slides instead of rolls. :)

Set your dynamic frictions to 1 and see how that affects things. Go down from there if you need it to not be 1.

more ▼

answered Apr 16 '11 at 11:47 PM

Jason B gravatar image

Jason B
1.7k 29 32 44

Thanks so much for the suggestion, I should probably mention though that I'm trying to simulate ball physics like these - http://www.tanktrouble.com/ - I think the problem is that when the angle gets to low, the physics think it should roll across the surface instead of bouncing away at the correct angle. so what I really need is a solution to get my ball physics down to pure bounce, for total reflection of the initial angle - Any suggestions please?

Thanks

Apr 17 '11 at 10:07 AM Graeme P

Ah, okay. Well then, you need to set your Bounciness of the physics material to something more. Keep in mind that a bounciness of 1 means that however much force you strike an object at, the exact opposite amount of force will be applied back. If you have a rigidbody with no damping and a bounciness of 1 (and a bounce combine of Maximum), it would theoretically bounce forever. Keep your friction high (to avoid sliding) and set the bounciness high (so it will bounce). If the bounciness isn't strong enough, consider changing to Maximum.

Apr 17 '11 at 03:33 PM Jason B

The default of Average will mean that if your ball (with a bounce of 1) and, say, a wall (with a bounce of 0) collides, the real bounce will have a strength of 0.5 (the average between the two), and thus the ball will rebound with half the energy it impacted at. In order to make projectiles bounce (I guess? Didn't play it much) forever as in TankTrouble, you might want to ensure there is no movement damping so the projectile never slows down.

Apr 17 '11 at 03:36 PM Jason B

I think i tried every variation, but i'l try again to make sure. Thanks a bunch for the help, really appreciate people being so helpful on this site.

Apr 19 '11 at 10:08 AM Graeme P
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1865
x807
x117
x45

asked: Apr 16 '11 at 11:29 PM

Seen: 4849 times

Last Updated: Apr 17 '11 at 10:19 AM