Page 1 of 1

Physics Bouncing Ball

Posted: Mon Mar 27, 2017 12:25 pm
by tonymaclane
How to simply make a ball to bounce when colliding on a Static object ?

Re: Physics Bouncing Ball

Posted: Mon Jan 22, 2018 5:29 am
by toparada2
Change surface type for the ball with high elasticity like "mat_rubber_bounce".
It'll work!!

Re: Physics Bouncing Ball

Posted: Mon Jan 22, 2018 8:56 am
by cry-alex
as tonymaclane already said you can adjust the surface type of the material in order to change the physical behavior such as friction or elasticity. In case you don't use GameSDK, which already declares several different surface types, I will go through the necessary steps to create your own surface type. The surface types are declared in a separate file which can be found under this path Assets\Libs\MaterialEffects\SurfaceTypes.xml. Here you can add a new type to the list:

Code: Select all

<SurfaceType name="mat_mysurfacetype"> <Physics friction="1" elasticity="1" pierceability="3" sound_obstruction="0.5" /> </SurfaceType>
After adding the new surface type to the list start the editor and assign it to your material. Now you can start to play around with the values until you are happy with the result.