Change the restitution Unity2d box2d

I’ve been searching all over the place on how to change the restitution on a body in Unity2d.

With box2dweb (as well as flash), you would change it through the bodies box/circle Fixture:
fixtureDef.restitution = val

I’m assuming body fixtures are replaced with rigidBody2D and have been looking over the docs and haven’t been able to figure out how to change this value.

1 Answer

1

Restitution is jargon that isn’t common in the Unity landscape. If you mean bounce, there are currently some options to affect bounce on a 2d material used by a 2d collider.

See Unity - Manual: Physics Material 2D

Restitution of 1.0 is the same as bouncincess of 1.0, as I understand it.

Yeah I figured thats not was it was called here but every other box2d version I've worked with it's what it was called. Awesome, that was what I've been looking for thanks!