# How to create physics elastic collision reaction

**URL:** <https://forums.unrealengine.com/t/how-to-create-physics-elastic-collision-reaction/490861>\
**Category:** World Creation\
**Tags:** unreal-engine, Physics, collision-responses, question\
**Created:** [November 12, 2021, 2:35pm UTC](https://forums.unrealengine.com/t/how-to-create-physics-elastic-collision-reaction/490861 "2021-11-12T14:35:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shadowfax2021](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/shadowfax2021/32/88717_2.png) [@Shadowfax2021](https://forums.unrealengine.com/u/Shadowfax2021)\
**Post date:** [November 12, 2021, 2:35pm UTC](https://forums.unrealengine.com/t/how-to-create-physics-elastic-collision-reaction/490861/1 "2021-11-12T14:35:18Z")

</div>

I try to make an elastic collision between two cubes, but the collision reaction is inelastic - when one cube collide the other, they both continue moved together attached.

The snapshot shows the scene where both cubes have the same properties and has the same physical material:

- Mass: 1kg
- Gravity: False
- Friction: 0
- Restitution: 1 ← this is set to 1 in order to create the “bouncing” reaction when collide

![352068-test9-scene.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/2/5/92594c4f8f35ea093808b4a3feb262966310c8a1.png)

Cube 1 then get an impulse of 1Ns in x direction which make it move at velocity of 100cm/s toward cube 2. When it hits Cube 2, they both continue together with a velocity of 50cm/s ☹

![352069-test9-log.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/7/b/e7b7bb2ec1971d35d28b5ae9213177e48d80690c.png)

Changing Restitution between 0 and 1 doesn’t have an effect , the collision is always inelastic. How should I make the physics collision reaction elastic ?

Thanks.

---

<div class="post-metadata">

**Author:** ![Eslake](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Eslake](https://forums.unrealengine.com/u/Eslake)\
**Post date:** [November 12, 2021, 11:11pm UTC](https://forums.unrealengine.com/t/how-to-create-physics-elastic-collision-reaction/490861/2 "2021-11-12T23:11:18Z")

</div>

You need lower mass.  
The physics system doesn’t handle them very well, and impact response is dampened by them far more than should be.

Try overriding the mass of the cubes and dropping them significantly to see if you don’t get the response you’re looking for.  
This is why physics materials allow you to adjust the density (weight ratio) of materials to determine the mass of objects.

---

<div class="post-metadata">

**Author:** ![Shadowfax2021](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/shadowfax2021/32/88717_2.png) [@Shadowfax2021](https://forums.unrealengine.com/u/Shadowfax2021)\
**Post date:** [November 13, 2021, 8:05pm UTC](https://forums.unrealengine.com/t/how-to-create-physics-elastic-collision-reaction/490861/3 "2021-11-13T20:05:06Z")

</div>

I followed your suggestions. Changing density value does nothing (I don’t know what it does if so). I also tried lowering the cubes mass to 0.01Kg (The parameter MassInKg) and the Impulse to cube 1 was reduced accordingly to 1Ns for keeping the velocity to 100cm/s. The results are the same, totally inelastic collision.

---

<div class="post-metadata">

**Author:** ![Shadowfax2021](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/shadowfax2021/32/88717_2.png) [@Shadowfax2021](https://forums.unrealengine.com/u/Shadowfax2021)\
**Post date:** [November 15, 2021, 5:29pm UTC](https://forums.unrealengine.com/t/how-to-create-physics-elastic-collision-reaction/490861/4 "2021-11-15T17:29:45Z")

</div>

I’ve got the solution from Marco Ghislanzoni ([https://www.youtube.com/c/MarcoGhislanzoni](https://www.youtube.com/c/MarcoGhislanzoni))  
There is UE4 parameter called Bounce Threshold Velocity which indicates to physx what is the minimum velocity of the object to allow bouncing calculation.

Project Settings → Physics → Simulation → Bounce Threshold Velocity

The default is 200cm/s. In my test the object velocity is 100cm/s, so no bouncing happens.  
After changing this parameter to 10m/s, I’ve got bouncing according to Restitution value.

Additional note:

The bouncing results may not always be elastic perfect - this may happens due to the physx solver numerical errors. This can be fixed by adding sub steps.
