mirror of
https://github.com/Dariasteam/Cows-Revenge.git
synced 2026-01-23 02:15:17 +00:00
Fix player vertical collision problem
This commit is contained in:
parent
bccb7695a2
commit
11d0bd7ef3
1 changed files with 5 additions and 1 deletions
|
|
@ -167,11 +167,15 @@ func _fixed_process(delta):
|
|||
motion = normal.slide(motion)
|
||||
velocity.y = 0
|
||||
else:
|
||||
# Está chocándose contra techo o pared
|
||||
# Está chocándose contra techo o pared
|
||||
can_jump = false
|
||||
colliding_in_jump = true
|
||||
motion = normal.slide(motion)
|
||||
jump_time = 0
|
||||
# Si está chocando contra el techo hacerlo caer
|
||||
if (normal.y > 0.2):
|
||||
velocity.y = 0
|
||||
|
||||
|
||||
move(motion)
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue