Search Unity

  1. Going to #UniteBerlin? Bring a buddy & get 25% off the 2nd ticket! More info here.
    Dismiss Notice
  2. Famed game designer and creator of The Sims, SimCIty, and Spore is looking for a 3D artist to join their team. Join the challenge.
    Dismiss Notice
  3. Unity 2017.4 has arrived! Read about it here.
    Dismiss Notice
  4. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  5. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  6. We've opened a new World Building sub-forum to faciltate all your world building discussions! Drop in and ask any ProBuilder, ProGrids, or PolyBrush questions.
    Dismiss Notice
  7. 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 at 1:42 PM.

  1. chaosmaker

    chaosmaker

    Joined:
    Jul 21, 2013
    Posts:
    19
    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