#Velocity
1 messages · Page 1 of 1 (latest)
Could you add a log next to the add force that prints out moveForce? Also make sure that a second script isn’t the one that’s moving the character
@modern vine
yes they seem alr
i printed move force here
and tbh they must be alr, because otherwise how is player moving
player moves fine in x and z
can even jump
but for some reason, velocity x and Z never changes
but the Y does change
Print out the velocity in the debug as well
under the add force
ok
is unity bugged or smth ahah
this is me jumping
(the force printed is to do with x and z movement)
some other force else where in code is doign the Y
but thats just to show
Y velocity changes
but X AND Z never does
actually yes that is very weird
is this a bug or something
lmao
how will i find a work around to this? i need to find out the speed of player
lmaoooo
well tbh i also need velocity to know players direction
the work around would be to find the current position - previous position / delta time, but I have maybe one last idea
its quite important
bruh nahh yea i dont wanna do that
is it uncommon to move player by adding force?
how do most people move player?
No it’s a pretty common to do it
I personally like having full control over the player’s movement and change its velocity instead but both work
its annoying coz my previous code did change velocity directly
but i recently changed it
Could you change it to ForceMode.Acceleration instead of .Force. It shouldn’t fix it, but I’m curious if it changes anything
thought so
that is confusing tho, how does impulse change velocity.. hmmm hmm
but the force doesnt
forcemode.impulse changes the Y velocity
but forcemode.force dont work
yes but why is unity saying velocity never changes
in physics analysis
debugger
well not only in the debugger, but rigid body as aw hole
can't even determine where the player is moving
and how fast
Do you have anything else that could be affecting movement? on the player
Remember to save first
ye
i hope to god
this fixes it
nope...
wait
could the aniamtor influence it?
for some reason when my avatar had some weird animation
it can, I was just about to bring that up
THE X AND Z seemed to have changed
velocity
why the fuck did the animator affect my velocity wow
lol
although I don’t know if can affect velocity. Disable root motion and/or the component and see if it changes anything
alr
who on earth came up with the idea that animations affect velocity
lmao
omg its working
and all of a sudden
im going supperrrrr fast
I knew that root motion could affect a moving object, but I’ve never seen it affect a rigidbody before. That’s interesting
thats gotta be a bug or smth LMAO
because i were still moving
and velocity was 0?
like what
Probably the 2 systems were overriding each others positions
interesting...
so when i overrided the velocity
it basically took over
whatever the animator was tryna do to it
oh well so we solved it! thanks for the help lol
im gonna have to do some adjusting to my players speed now
coz for some reason after disbaling root motion
the player speeeeds realy fast