Characterbody3d question

I made a gravity using Vector3.Down and jumping using Vector3.UP.

If i add to velocity Vector3.RIGHT should it move character right or not?

why don’t you just do science on that?

I made science right now.
In normal case it should move right.
I found that Vector3 replaces vector from velocity. So that works weird

It works only if I use if is_on_floor():
and before move_and_slide

well, it depends on what you’re calling “right”…
Vector3.RIGHT is in the global coordinates, but you may want the local coordinates of the object
you should explain what you want to acheive better

I want velocity += Vector3.Right work
So i find solution
I put velocity += Vector3.Right before all direction and jumping calculation.

So i put it after all calculations right above move_and_slide and it works

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.