Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Alternative to SetUseConeFriction in U5

Discussion in 'Physics' started by memphy, Mar 17, 2015.

  1. memphy

    memphy

    Joined:
    Aug 4, 2014
    Posts:
    2
    Hello,

    I'm trying to ugrade to U5, but there is a blocker in a missing functionality. When I want to set the useConeFriction parameter on RigidBody, I get this warning:
    SetUseConeFriction has no effect. Cone friction is no longer supported, see setFrictionModel instead

    I searched for the suggested method and for FrictionModel, but I can't find it anywhere. Did anyone encounter the same problem?
     
    Last edited: Mar 17, 2015
  2. memphy

    memphy

    Joined:
    Aug 4, 2014
    Posts:
    2
    Hello again,

    It looks like we found a solution. Thanks to the PhysX visual debugger we were able to replicate the scene outside of Unity and examine what is going on. The strange object behavior is caused by PhysX when the FrictionType is set to PATCH or
    PxFrictionType::eTWO_DIRECTIONAL.
    After we set the FrictionType to PxFrictionType::eONE_DIRECTIONAL, the objects started to behave correctly.
    (see http://docs.nvidia.com/gameworks/content/gameworkslibrary/physx/guide/Manual/Friction.html)

    The problem I'm talking about is well documented here: http://forum.unity3d.com/threads/physics-friction-bug.63882/
    And the solution to this problem was the parameter useConeFriction (before it vanished in U5).

    Unfortunatelly I can't find a way how to set the FrictionType from Unity. Is it possible in the current version? Or is it on the list in close future?
    Like I mentioned before it is a blocker preventing us from migrating to U5 and I believe it will be a problem for more physics dependent games.

    PS: It will also be good to be able to connect the PhysX visual debugger directly to Unity, but it's a question for a different thread :)
     
  3. waltran

    waltran

    Joined:
    Feb 23, 2017
    Posts:
    36
    very big bump.

    i'm upgrading a project from u4 to u5.

    in u4 project our rigidbodies set for useconefriction=false,

    now this is no longer exists in physx 3.3.3 but the default friction model in u5 gives very similar results with u4 userconefriction=true.

    and i think unity devs forgot to delete useconfriction from rigidbody class.

    will unity add this, because i don't need conefriction friction in u5 ?
    http://docs.nvidia.com/gameworks/co...xScene.html#a9ff7784b4d51acf2d56b9462e256b58b

    Code (CSharp):
    1.         //
    2.         // Summary:
    3.         //     ///
    4.         //     Force cone friction to be used for this rigidbody.
    5.         //     ///
    6.         [Obsolete("Cone friction is no longer supported.")]
    7.         public bool useConeFriction { get; set; }
    why this still exists as deprecated even though it is obsolete. (that sounds wrong.)
     
    Last edited: Mar 16, 2017