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.
  2. 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.