Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Simulate One Single Rigidbody/Reference For Rigidbody Physics

Discussion in 'Physics' started by Jawsarn, Oct 30, 2018.

  1. Jawsarn

    Jawsarn

    Joined:
    Jan 12, 2017
    Posts:
    245
    So I want to basically use Physics.Simulate(); on one single Rigidbody. This ties into server/client reconciliation, where I reset an object with position, velocity etc. received from server and applying stored inputs and fastforward the physics of that object to get to the current estimated position.

    I haven't found any method of this yet, but if there exist that would solve all my problems.
    If not, is there any reference code for updating a rigidbody (move, drag, angular etc) so I can use the same code that goes into PhysX(?) ?

    Thanks for any tips and trix!
     
  2. Jawsarn

    Jawsarn

    Joined:
    Jan 12, 2017
    Posts:
    245
    Trying to do this on my own, anyone have any code example how to apply angular velocity? Using euler angles doesn't seem to work so well for me.
     
  3. Jawsarn

    Jawsarn

    Joined:
    Jan 12, 2017
    Posts:
    245
    Well, seems like I only missed that there exist a maxAngularVelocity that I need to clamp the values to to get the same results.