#vectors
1 messages · Page 1 of 1 (latest)
Heres the photo
what's your scene look like?
ok, and when you say sliding around, can you remind me what you mean by that?
Okay my pc just died lmao
Oh shi
Idk if I saved
Wellllll
Nvm it’s still here
Oml that scared me
What?
what's that blue guys components look like?
what needs to be fixed?
linear drag is 0
but that's not your "problem"
linear drag is basically "air resistence"
what does air resistance have to do wtih this?
do you remember newton's first law?
im not a real engineer
an object in motion tends to stay in motion unless an external force acts upon it
but yes
you told your guy to move
so he's moving
or rather, you told him to set his velocity a certain way
motion is just velocity
so he's gonna keep moving unless something tells him to stop
uh oh
"if I recall correctly"
ok
so how would i do "OnKeyUp" is it anew script do i add it in thee "if" statemet?
it's a different state, so you won't see both GetKeyDown and GetKeyUp be true for the same key on the same frame
else if
"if <condition>, then do this, else if the previous stuff was false and <condition>, then do this other stuff, and if everything else was false, then do this stuff"
what would be command for "previous stuff"?
else if (???)
because i reciene a invalid expression error
you do
you'll see how they work when you read up on them
they're pretty core to programming so you'll need to know them
yes i pretty sure i need a condition
okay but i understand em but i dont gt what i need to put inside
well if the velocity is X, and you want it to be 0, what should you do?
how were you setting velocity before?
rb2D.Velocity = new Vector2(0,0);?
nope
i like you man tysm for your help it is greatly appreciated!
👍