0

This is my first question on stack overflow, so kindly forgive me for any mistakes i might've made. I am working on a project which uses both mediapipe as well as Ursina (to make a motion-capture game in python). I tried to use both the libraries but only one window pops up (based on which is placed first, if ursina is placed first the game opens and if mediapipe code is placed first the camera opens). To fix this problem, i have used the "multiprocessing" library to open both at once. here is a sample code :

from anotherfile import mediapipe_code

#this file:
    def setup():
        app = Ursina() #and all other default setup

        def update():
            # this is the problem

if __name__ == "__main__":
    proc1 = multiprocessing.Process(target=mediapipe_code)
    proc2 = multiprocessing.Process(target=setup)

    proc1.start()
    proc2.start()

    proc1.join()
    proc2.join()

Both the windows open just fine but the update function doesn't run. So is there any way to fix this? ik it was a long story im sorry :)

I have tried putting the update function in another process but it runs only once. I want to run every frame like it normally does.

Akarsh
  • 1
  • 2

0 Answers0