I'm working on a game in Ursina where player receives damage and is able to regenerate health when there is no danger nearby. I planned to do this by using the default "update" function for the Player class, which inherits from the standard FirstPersonController class.
The idea is that with update function, the game checks how much health the player has and if its below 100, it slowly regenerates it.
However, when I put this regeneration function inside update, the player control freezes completely. I cant walk nor look around with mouse. All the other methods I made for player, work for some reason and I know it's not the game that is frozen but the player.
To check that I even made an empty function that just returns when called in the update update and the exact same thing happens.
I then tried making simple movement for the player, such as:
def move(self):
if held_keys["w"]:
self.x += 3 * time.dt
and when I launch the game, and press "w", the player actually moves. This leads me to conclusion that if you create the update function for the FirstPersonController class, it blocks all the controls for some reason.
So, my question is, can this problem be fixed somehow ?