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

Resolved Havok - turn off sleeping for specific bodies?

Discussion in 'Physics for ECS' started by as_nau, Dec 16, 2020.

  1. as_nau

    as_nau

    Joined:
    Oct 11, 2020
    Posts:
    30
    I am using a spherical trigger to track bodies colliding with it. This is something like a vision system for specific bodies. It works fine with Unity.Physics and Havok physics with sleeping off.

    Problems arise when I turn on "Enable sleeping" mode. If the bodies stop moving, they stop interacting with the trigger and ITriggerEventsJob Execute callback are not called any more for that bodies. So they disappear from vision.

    I want to use Havok with sleeping enabled, that improve performance for many other physics bodies that should not interact with vision system. Can I somehow prohibit sending certain bodies to sleep? Or write a system that wakes up certain bodies at each fixed step if they are sleeping (maybe by removing specific tag which excludes the body from physics calculations)?
     
  2. papopov

    papopov

    Joined:
    Jun 29, 2020
    Posts:
    32
    Hi,
    In the release after the upcoming one, we are making a functionality that will raise trigger events from deactivated bodies, so this will be supported out of the box.
     
  3. as_nau

    as_nau

    Joined:
    Oct 11, 2020
    Posts:
    30
    Hi papopov, that's great, thank you!
     
    Last edited: Dec 16, 2020