#Import necessary modules
from direct.showbase.ShowBase import ShowBase
from direct.actor.Actor import Actor
from panda3d.core import AmbientLight, DirectionalLight, LightAttrib

# Define the game class
class CharacterTestGame(ShowBase):
    def __init__(self):
        # Initialize the ShowBase class
        super().__init__()

        # Load the character model
        model_path = "C:\\Users\\Vusum\\Wii - Naruto Shippuden Clash of Ninja Revolution 3 - Sasuke.fbx"
        self.character = Actor(model_path)

        # Set the initial position and orientation of the character
        self.character.reparentTo(self.render)
        self.character.setScale(0.5)  # Adjust the scale as needed
        self.character.setPos(0, 0, 0)  # Set the initial position

        # Set up lighting
        ambient_light = AmbientLight("ambient_light")
        ambient_light.setColor((0.2, 0.2, 0.2, 1))
        directional_light = DirectionalLight("directional_light")
        directional_light.setDirection((-5, -5, -5))
        render.attachNewNode(directional_light.upcastToPandaNode())
        render.attachNewNode(ambient_light.upcastToPandaNode())
        render.setLight(render.attachNewNode(directional_light.upcastToPandaNode()))
        render.setLight(render.attachNewNode(ambient_light.upcastToPandaNode()))

        # Set up the camera
        self.disableMouse()
        self.camera.setPos(0, -20, 5)
        self.camera.lookAt(self.character)

        # Set up keyboard controls
        self.accept("w", self.move_forward)
        self.accept("s", self.move_backward)
        self.accept("a", self.move_left)
        self.accept("d", self.move_right)

    def move_forward(self):
        self.character.setY(self.character, 0.5)

    def move_backward(self):
        self.character.setY(self.character, -0.5)

    def move_left(self):
        self.character.setX(self.character, -0.5)

    def move_right(self):
        self.character.setX(self.character, 0.5)

# Run the game
game = CharacterTestGame()
game.run() i get this error C:\Users\Vusum>python c6.py
Known pipe types:
  wglGraphicsPipe
(all display modules loaded.)
:assimp(error): Unable to open file "/c/Users/Vusum/C:\Users\Vusum\Wii - Naruto Shippuden Clash of Ninja Revolution 3 - Sasuke.fbx".
:assimp(error): Unable to open file "/d/Panda3D-1.10.14-x64/etc/../C:\Users\Vusum\Wii - Naruto Shippuden Clash of Ninja Revolution 3 - Sasuke.fbx".
:assimp(error): Unable to open file "/d/Panda3D-1.10.14-x64/etc/../models/C:\Users\Vusum\Wii - Naruto Shippuden Clash of Ninja Revolution 3 - Sasuke.fbx".
:loader(error): Couldn't load file C:\Users\Vusum\Wii - Naruto Shippuden Clash of Ninja Revolution 3 - Sasuke.fbx: not found on model path (currently: "/c/Users/Vusum;/d/Panda3D-1.10.14-x64/etc/..;/d/Panda3D-1.10.14-x64/etc/../models")
Traceback (most recent call last):
  File "C:\Users\Vusum\c6.py", line 55, in <module>
    game = CharacterTestGame()
  File "C:\Users\Vusum\c6.py", line 14, in __init__
    self.character = Actor(model_path)
  File "D:\Panda3D-1.10.14-x64\direct\actor\Actor.py", line 293, in __init__
    self.loadModel(models, copy = copy, okMissing = okMissing)
  File "D:\Panda3D-1.10.14-x64\direct\actor\Actor.py", line 1916, in loadModel
    raise IOError("Could not load Actor model %s" % (modelPath))
OSError: Could not load Actor model C:\Users\Vusum\Wii - Naruto Shippuden Clash of Ninja Revolution 3 - Sasuke.fbx