Godlike / Pegasus

Game physics engine (can fly)
MIT License
5 stars 2 forks source link

Demo scene frize #113

Closed ilia-glushchenko closed 5 years ago

ilia-glushchenko commented 6 years ago

Steps to reproduce:

  1. Run demo
  2. Set primitive type to Sphere, set Radius to 0.1, set Amount to 20
  3. Keep generating objects until the scene is frozen, usually takes around 100 object

Result: Scene freezes

Expected result: Regular simulation should continue working

It probably has something to do with inf and nan generation during friction collision resolution step, it seems that disabling this step helps sometimes, but not always. Generally, there might be various reasons, cross products of coaligned vectors, vectors that have too small members such as 1e-250 and some operations with those vectors. The problem looks to be localized within collision resolution phase

ilia-glushchenko commented 5 years ago

Resolved in #128 and #131