TSMaterial causes objects to Jitter.

It doesn't matter which object has a TSMaterial. In my example scene, a box falls on to a floor. If either the box or the floor have a TSMaterial, the box will never settle.

No TSMaterial (Good)


With TSMaterial (Bad!)


I know the physics engine is called Jitter, but I don't think this is intended. Harhar. :smiley:

Without TSMaterials, I need to set the linear drag on the rigidbody to a high value. But this means that it falls really slowly, since it has so much linear drag! I need TSMaterials.

Comments

  • Hahahah yeah, the name is Jitter but it not intended too. We saw this issue before, it happens in other situations also which not happens with the 2D physics. As you saw in other answers our focus is TrueSync core stuff, we decided to open source physics to give a change to other devs take a look a those issues.
  • I was mainly just documenting, I'm happy to take a look at the source today and see if I can figure something out. :)
  • Prodigga
    Prodigga
    edited March 2017
    @JeffersonHenrique

    I found that using smaller values in ContactSettings helped minimise the jittering.

    These values need to be public - I don't think there is a single value that 'fits all' situations.

    The values I have selected will make sure that the default TS box will not jitter if you give it a TSMaterial. This could be a 'baseline' - then, depending on the scale that you are working in for your game, you might need to tweak the values yourself. Have you guys considered moving these settings, as well as the 3d/2d physics settings into a new physics config file? (ie, not TrueSyncConfig)

    You can find the changes I made here:
    https://bitbucket.org/pelicanpunch/truesync/commits/783aed6d5621cabb17a0d432805a6db759133110?at=master

    Before:


    Proposed change:

  • Thanks @Prodigga, we do consider to move to a separated config, we are putting all together because we made public only a few variables. Great improvement on that issue!
  • Wow, huge improvement for me too. Can we get this as a config please!
  • @Prodigga Hey your links down so I tried to change the contact settings myself but I can't seem to get the results your showing any help would be appreciated :D