Search Unity

Bug Rigidbody.isKinematic problem.

Discussion in 'Physics' started by janekT, Apr 11, 2023.

  1. janekT

    janekT

    Joined:
    Feb 16, 2017
    Posts:
    3
    I have two objects that uses same script that is very simple to move object rb.MovePoistion(....). One object doesn't move at all and second one moves normally when rb.isKinematic is true. Why does this happen?

    Code (CSharp):
    1.         public void UpdatePosition()
    2.         {
    3.             rb.MovePosition(rb.position + data.velocity);
    4.         }

    Uploaded Image where data is shown where you can see that one game object velocity adds up, but transform stays same.
     

    Attached Files:

    • 1.png
      1.png
      File size:
      150.6 KB
      Views:
      74
    Last edited: Apr 11, 2023