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.

switching between havok and unity physics at runtime

Discussion in 'Physics for ECS' started by snacktime, Dec 2, 2020.

  1. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,351
    So I accidentally left havok enabled in a scene and found out that loading another scene without havok doesn't really work. But curious now is it supposed to? I ended up with bodies from the first scene still there although I had destroyed the entities, and in the 2nd scene unity.physics bodies were interacting with the havok bodies, although not always nicely.
     
  2. petarmHavok

    petarmHavok

    Joined:
    Nov 20, 2018
    Posts:
    461
    This feels like a timing issue. If I had to guess, I would say you need to step Havok once more after unloading your previous scene to make sure it "finds out" about entity removals. That is if you want to keep stepping Havok in the new scene.

    Having bodies from 2 scenes interact sounds like it's a problem with cleanup, unless both engines are stepped in the new scene.