Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Resolved PhysicsMassOverride made item moving downward

Discussion in 'Physics Previews' started by flyingmylove, Jan 7, 2021.

  1. flyingmylove

    flyingmylove

    Joined:
    Sep 29, 2019
    Posts:
    11
    Hi! I am using 2020.1 and physics 0.5.1. I would like to add PhysicsMassOverride to entity with dynamic body to make it kinematic body. However, when I add PhysicsMassOverride with the buffer from EndSimulationEntityCommandBufferSystem, the item start to move downward with a constant speed (like 1m/s) if IsKinematic > 0.
    Is this a bug? I saw the previous Unity 5.1 has the same bug, but that is 5 years ago.......
     
  2. petarmHavok

    petarmHavok

    Joined:
    Nov 20, 2018
    Posts:
    461
    Can you check the velocity of the kinematic body? Just being kinematic doesn't guarantee that the velocity will be 0, there are kinematic bodies that move with constant speed.
     
  3. flyingmylove

    flyingmylove

    Joined:
    Sep 29, 2019
    Posts:
    11
    Hi! I have checked the velocity and the value is not zero. But I also have a question about the switch between kinematic and dynamic status: is there some resources or guideline to the status preservation of such switch? e.g.: store velocity/mass etc. data somewhere and then recover them? I have tried to store the velocity but the physics behavior is wierd, so I guess I must have missed something......
     
  4. milos85miki

    milos85miki

    Joined:
    Nov 29, 2019
    Posts:
    197
    I guess this is the problem you described in this DOTS physics thread?
    I replied to that one, so maybe it's best to continue the discussion over there.
     
    flyingmylove likes this.