character not moving with velocity

Hey, guys, I am an artist and new to unity.
Idk something happened last night when I was playing with some codes, and all of a sudden movement of the character using rigid body velocity is stopped
code is absolutely right as I tested it many times.
tried doing the same with transform.translate it works fine with it
even I tried putting the
vb=pb. velocity; before the movement code
but when I tried assigning rigid body manually to the (public rigid body RB)
I see it working internally but no movement on my player

any help on this

I

If the code was correct then it would be working right?

The code you show as an image reads the Rigidbody velocity into “vb” then proceeds to overwrite that with a Vector3 composed of raw inputs then does nothing with it which makes this code kind of pointless.

Don’t you want to assign the velocity to the Rigidbody.velocity?

Note also that this is being done per-frame but physics updates per fixed-update (by default) so any change in velocity only get processed then.

1 Like

aaaaaa
i got the answer fo this
but can anyone explain
how
vb=rb.velocity
is different then
rb.velocity=vb

thank you that solved the issue