Search Unity

Calculate Angular velocity based on two rotations?

Discussion in 'Scripting' started by battou, Apr 3, 2019.

  1. battou

    battou

    Joined:
    Jan 25, 2011
    Posts:
    222
    So, is there a way to calculate angular velocity of a kinematic rigidbody at the moment of switching to non-kinematic? I need it tomake rigidbody continue to move and rotate after its been released. Cant find any solution.(
    Please, help!
     
  2. WarmedxMints

    WarmedxMints

    Joined:
    Feb 6, 2017
    Posts:
    1,035
    You can record the movement and rotation over the previous frames and calc an average based on that if you like. The steam vr api has an example of how to do that in the esitmated velocity class.
     
  3. battou

    battou

    Joined:
    Jan 25, 2011
    Posts:
    222
    Im using Oculus for vr, dont know if there is such a class. Average rotation i not the problem, but how to convert it to Vector3 angular velocity?