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.

Question How to rollback physics world?

Discussion in 'Physics for ECS' started by VincentSai1984, Sep 7, 2020.

  1. VincentSai1984

    VincentSai1984

    Joined:
    Sep 7, 2020
    Posts:
    9
    I had clone physics world from BuildPhysicsWorld.PhysicsWorld, assign it back to BuildPhysicsWorld.PhysicsWorld after few step and nothing change.
    Do I also need to clone Translation, Rotation data for rollback?
     
  2. petarmHavok

    petarmHavok

    Joined:
    Nov 20, 2018
    Posts:
    461
    It's best you clone the ECS data, not physics runtime data, since physics runtime data is created based on ECS data each frame in BuildPhysicsWorld, so it probably gets overwritten in your case.
     
    Opeth001 likes this.