Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Setting linear velocity of a kinematic body is not supported
#1
Hello,

We are currently in the process of upgrading our project from Unity 2020.3.26f1 to Unity 2022.1.17f1

We get spammed by this message

Quote:Setting linear velocity of a kinematic body is not supported.
UnityEngine.Rigidbody:set_velocity (UnityEngine.Vector3)
Obi.ObiRigidbody:UpdateKinematicVelocities (single) (at Assets/Obi/Scripts/Common/Collisions/ObiRigidbody.cs:34)
Obi.ObiRigidbody:UpdateIfNeeded (single) (at Assets/Obi/Scripts/Common/Collisions/ObiRigidbody.cs:47)
Obi.ObiColliderWorld:UpdateRigidbodies (System.Collections.Generic.List`1<Obi.ObiSolver>,single) (at Assets/Obi/Scripts/Common/Collisions/ObiColliderWorld.cs:378)
Obi.ObiUpdater:BeginStep (single) (at Assets/Obi/Scripts/Common/Updaters/ObiUpdater.cs:55)
Obi.ObiFixedUpdater:FixedUpdate () (at Assets/Obi/Scripts/Common/Updaters/ObiFixedUpdater.cs:46)


and this one

Quote:Setting angular velocity of a kinematic body is not supported.
UnityEngine.Rigidbody:set_angularVelocity (UnityEngine.Vector3)
Obi.ObiRigidbody:UpdateKinematicVelocities (single) (at Assets/Obi/Scripts/Common/Collisions/ObiRigidbody.cs:38)
Obi.ObiRigidbody:UpdateIfNeeded (single) (at Assets/Obi/Scripts/Common/Collisions/ObiRigidbody.cs:47)
Obi.ObiColliderWorld:UpdateRigidbodies (System.Collections.Generic.List`1<Obi.ObiSolver>,single) (at Assets/Obi/Scripts/Common/Collisions/ObiColliderWorld.cs:378)
Obi.ObiUpdater:BeginStep (single) (at Assets/Obi/Scripts/Common/Updaters/ObiUpdater.cs:55)
Obi.ObiFixedUpdater:FixedUpdate () (at Assets/Obi/Scripts/Common/Updaters/ObiFixedUpdater.cs:46)


Upon investigation, we saw this message from a Unity dev https://forum.unity.com/threads/kinemati...st-7822350
and also noted that they added this line in the 2022.1 docs (last line at the bottom)
Quote:Additionally, setting the linear velocity of a kinematic rigidbody is not allowed and will have no effect.

The obi code actually checks if the body is Kinematic before setting the velocity and angularVelocity.

We'll comment this code out since it's not suppose to affect anything.

Is this code suppose to be useful or is it obsolete?

Cheers
Reply


Messages In This Thread
Setting linear velocity of a kinematic body is not supported - by bagelbaker - 30-09-2022, 08:35 PM