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

Locking a plane

Discussion in 'Physics Previews' started by frimarichard, Jan 13, 2020.

  1. frimarichard

    frimarichard

    Joined:
    Jul 24, 2017
    Posts:
    31
    Is there a recommended method of locking a plane for specific physics bodies? This would be equivalent to
    RigidbodyConstraints.FreezePositionY.

    In my project, I have bodies I want to lock to translation.y=0. I've tried forcing translation.y=0 and velocity.y=0 in a job, which seems to work most of the time, except occasionally the translation/rotation/localtoworld values will suddenly NaN and everything goes wrong.

    Thanks!
     
    Last edited: Jan 13, 2020
    tigerleapgorge likes this.
  2. frimarichard

    frimarichard

    Joined:
    Jul 24, 2017
    Posts:
    31
    tigerleapgorge likes this.