Search Unity

  1. Improved Prefab workflow (includes Nested Prefabs!), 2D isometric Tilemap and more! Get the 2018.3 Beta now.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice
  4. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

PhysX friction parameter access missing after Unity 5 and later.

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

  1. chaosmaker


    Jul 21, 2013
    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:
    Unity 4 coneFriction enabled:
    Unity 4 coneFriction disabled:

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