I want to make a 1st person game and the whole problem started by making an accessible inventory. Whenever I used mouse.locked
(no matter if i do mouse.locked = True
or mouse.locked = False
) (it basically makes possible to move the cursor around the screen, not to look around), black screen started flickering over the game window. Any ideas how to fix that?
Code:
from ursina import *
from ursina.prefabs.first_person_controller import FirstPersonController
if inventory.visible == True:
player.speed = 0
player.jump_height = 0
grid.visible = True
mouse.locked = False #If I put this here, black screen starts flickering. Pls help...
testitem.visible = True