Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Disable Physic Calculation for mobile platforms

Discussion in 'iOS and tvOS' started by Onyx, Nov 25, 2010.

  1. Onyx

    Onyx

    Joined:
    Nov 21, 2010
    Posts:
    41
    Hi,

    Is there a way to disable Physic calculations altogether (iPhone target)? I'm working on a project that is mainly UI based and wondering if it's possible to do so.

    Thanks,
     
  2. andeeeee

    andeeeee

    Joined:
    Jul 19, 2005
    Posts:
    8,768
    Are you detecting an overhead from the physics engine even when you don't use any rigidbodies or colliders?
     
  3. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    you can tell the physics to basically "never update" by raising the fixed step length in the editor settings - time settings to a very high value.
    just be aware that this also impacts all collision
     
  4. Onyx

    Onyx

    Joined:
    Nov 21, 2010
    Posts:
    41
    With a scene containing only GUI objects and background music playing, no colliders or rigidbodies, I get physx: 0.7 to 1.1 in the player-detail stats (sometimes it jumps to 2.8).

    Any idea where it comes from?

    Thanks,
     
  5. Onyx

    Onyx

    Joined:
    Nov 21, 2010
    Posts:
    41
    That seems to work: physx: 0.0 (I set the fixed step length to 10 - Max).

    But is this Fixed Timestep value used for anything else than collision? I'm not sure what is this value for and would like to avoid creating other problems along the road with time based calculations or else.
     
  6. mudloop

    mudloop

    Joined:
    May 3, 2009
    Posts:
    1,107
    It's also used for calling the FixedUpdate methods.
     
    lermy3d likes this.
  7. Onyx

    Onyx

    Joined:
    Nov 21, 2010
    Posts:
    41
    Thanks for the info.
     
    lermy3d likes this.