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. Dismiss Notice

Question below a value "0" drag isn't 0 ,, can I turn this off??

Discussion in 'Physics' started by tsmspace, Aug 8, 2023.

  1. tsmspace

    tsmspace

    Joined:
    Oct 6, 2019
    Posts:
    39
    I have a space game ,, during most gameplay the player would never drop their velocity below 0.01 .. I don't know the actual threshold but when my velocity gets right close to 0, it drops to 0.

    My game has a dockport in it, and unfortunately it does defy physics a bit to drop to 0 at the very low velocity the player plays at while trying to line up just right,, and although some may like it, some may not, overall I feel that I would rather be able to just preserve even these tiny amounts of momentum. Is this something that can be changed with a setting??
     
  2. zulo3d

    zulo3d

    Joined:
    Feb 18, 2023
    Posts:
    510
    Code (CSharp):
    1. GetComponent<Rigidbody>().sleepThreshold=0;
     
  3. tsmspace

    tsmspace

    Joined:
    Oct 6, 2019
    Posts:
    39
    so I would use this on the awake of my vehicle movement script?

    nvr mind,, I got it. in physics.
     
    Last edited: Aug 8, 2023
  4. zulo3d

    zulo3d

    Joined:
    Feb 18, 2023
    Posts:
    510
    You can do it in the physics settings which will be global and will affect all objects. Or you can do it in Awake or Start for a specific objects only.. It's probably best to do it per object as it's usually best to let objects sleep if they're barely moving.