Rigidbody2D.angularVelocity returns 0 3/4 fixed update calls

8376951--1104372--upload_2022-8-20_14-43-32.png

void FixedUpdate()
        {
            Debug.Log(rb2d.angularVelocity);
        }

There’s no question here nor any other information. There’s nothing to debug nor suggest because of this.

Unity 2021.3.5f1. What do you want me to give you? I can share information that you need to debug it

Describe what you’re doing. Right now there’s nothing but a console output. You’re sort of indicating that it’s rotating and doing nothing to it yet it’s giving you this output. Is this the only Rigidbody2D with this script? Is the Rigidbody2D being modified by any other scripts? Basically stuff like this; something!

I will say that there’s nothing wrong with angular velocity. This is such a basic thing that it’d mean physics is completely broken and devs would have their pitchforks out. Reading this just reads straight from the Box2D body.

  • Create an empty scene
  • Create a GameObject with a Rigidbody2D and a script to set it rotating in the Start then leave it
  • Output its angular velocity as above
  • With no angular drag it’ll stay the same. With angular drag it’ll reduce

I bet you have 4 bodies and only one of them is being affected by angular motion.

Try this: Press “pause” (next to the play button) and then press “Play”. How many messages appeared in the console?

1 Like