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 How do i implement system similar to the "sleep" of the Rigidbody component?

Discussion in 'Physics for ECS' started by ops0606, Oct 9, 2023.

  1. ops0606

    ops0606

    Joined:
    Dec 6, 2016
    Posts:
    6
    I'm aware that Havok already supports sleep. However, purchasing the Pro license is a bit burdensome for me, so I'm trying to implement it, albeit crudely.

    Firstly, I've implemented the terrain using a single large Mesh Collider.
    A very large number (more than 50,000) of sphere colliders come into contact with this terrain.
    In terms of game logic, they don't always move, so I don't want to use PhysicVelocity when they're idle.
    However, the frequency of movement is too ambiguous to add/remove components.
    How can I optimize this?

    And Would splitting the Mesh Collider help with optimization?