Skip to content

9 comments

What is ‘This’? Line 18

Edit: to be clear, the other replies about velocity/force might also be right but that’s what stuck out to me.

8 points

I would try to override the applyForce method and use linearVelocity instead.

4 points

Why is the Y axis set to -10? If you want to make the character move forward than the X position (the top one) needs to be set to one and everything else needs to be set to 0. Correct me if I'm wrong please.

3 points

Characters typically have a forward vector. You don't just assume or move X or Y as many factors (mesh rotation) can cause these to not be what you want directionally

You should move the character in the direction of the forward vector (1 to go forward, -1 to go reverse) and the right vector (1 to go right, -1 to go left).

2 points

Try moving the rigidbody in incrments rather than applying a force to it, that helped me when I got stuck with character movement. Though you'd have to use a different function to not only sense if the right button is pushed but also when it's NOT being pushed.

I think this is the one; Input.GetKeyDown

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.