Commit 738db14
committed
player: Invert jump velocity parameter & adjust range
When the player jumps, the y component of their velocity is set to
jump_velocity. In Godot, up is negative. So velocity.y must be set to a
negative number.
But I don't think this means that the jump_velocity parameter needs to
be negative. And certainly it doesn't make sense for its range to
include jumping *downwards* by setting it to a positive number: I have
tested this and as expected it doesn't actually work.
Invert jump_velocity: set velocity.y to its negation when jumping.
Adjust the default value accordingly. Change the range to 0–2000 rather
than -1000–1000.1 parent a0c29b4 commit 738db14
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
| 110 | + | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| |||
0 commit comments