Search Unity

  1. If you have experience with import & exporting custom (.unitypackage) packages, please help complete a survey (open until May 15, 2024).
    Dismiss Notice
  2. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice

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,356
    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.