Search Unity

PhysX friction parameter access missing after Unity 5 and later.

Discussion in 'Physics' started by chaosmaker, Apr 16, 2018.

  1. chaosmaker

    chaosmaker

    Joined:
    Jul 21, 2013
    Posts:
    29
    Our game is very Physics oriented so the problem it is crucial for it.

    Here below you can find the description to the problem.

    Thank you very much.

    All the best,

    ***********************************************************************
    Game : Pool Elite
    (Cross platform, Browser, PC, Mobile, Consoles)
    50K MAU for now on soft launch

    TLDR version of the problem and need :

    In Unity 4 you could set rigidbody.useConeFriction to false and Physx worked perfectly.
    With Unity5 and later we can not change it and Physx works very differently for our realistic Pool game.

    This is the configuration we need to access from Unity:
    PxMaterialFlag and PxFrictionType

    Long version of the problem and need :

    Our Pool game is very Physx related. We worked and got approval from 2 World Champions and our main differentiation from popular pool games is that we achieve top 3D graphics and real life Physx on all platforms using Unity3d.

    When throwing a sphere collider to a box collider, sphere moves in incorrect direction after collision.

    You can see an example here in Unity 5. The behaviour in this video can be reproduced in Unity 5 and later.

    We tried the same test in Unity 4: Video link.. The collision result is correct.

    In Unity 4, if we set rigidbody.useConeFriction to TRUE, it behaves similar to Unity 5, as you can see in this video.

    In some cases, collisions cause the ball to GAIN momentum, even with a low bounciness value.

    Since we are making a billiards game, the behaviour in first video is completely game breaking. Unity 4 with cone friction enabled causes a similar issue, so we suspect that friction settings are the cause. However, friction settings of rigidbody were removed since Unity 5 , so we cannot test it. Cone and pyramid friction models still exist in PhysX SDK, the problem is that Unity's rigidbody does not support them.
    Tested PhysX SDK demos and This is the configuration we need to access from Unity:
    PxMaterialFlag and PxFrictionType

    Thank you.

    Video links:
    Unity 5: https://drive.google.com/open?id=1gVbfguKtGkNc_uO2VSeyBt5GLm672Iyc
    Unity 4 coneFriction enabled: https://drive.google.com/open?id=17Eeyumi-le-oLxp6Lke2n1tqzsFul4rL
    Unity 4 coneFriction disabled: https://drive.google.com/open?id=1zuSNZ4BtAryVAPHUOwlgB-iyVg_htJ2s

    PoolElite (2).jpg PoolElite (3).jpg PoolElite (8).jpg