![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | Dragonwarrior2004 |
My current project is an Action Adventure RPG with doorways that teleport you to new areas and uses a fade-in fade-out animation, however, the animation has to be connected to my player where the walking animations are. The only way to play the fade animations is to stop the players ability to move. How can I stop the functions that allow the player to move?
Maybe you could make velocity.x or velocity.y or both equal 0 if a variable is true or not. like:
var door_anim = false
func _physics_process(delta):
if door_anim == false:
#movement code and other stuff here
else:
velocity.x = 0
ianzzap | 2020-06-23 04:28