I have been trying to use the character controller found here but when I try to run it, I am getting an error message saying how there is not such file or directory
from characterController.PlayerController import PlayerController
That is the error message I am getting, I have tried to move the file around from the config directory to other ones and then change the path. Also renaming the file but those did not work. Does anyone have any idea of why it isnât working or can help me with debugging?
Many thanks.
Yes that fixed that error thank you! Do you know how i should have my data folder from the character controller set out in my file system?
I currently have it like this
I have tried to change the file paths within the configs.json file but to no luck(tried changing the âŚ/ to ./). Is there something wrong with my file system?
Iâve never tried the character controller on windows, which is why I have missed that path specific problem. Itâs good that you found it though, will implement a fix for that in the next version.
Regarding the data folder, you could put that wherever you want as long as the path is correctly set in the config json file. Iâve rarely used relative paths with it, but as long as the models can be found anywhere in the configured search paths it should be fine. In your example, you may want to set something like model-path $MAIN_DIR/data/ then you should be able to set the configuration in json to âmodelâ: âactor/Foxâ.
I have done it now, but still the same. I think I have figured it out though. in the physicsInternal.py is using ``âbase.ââ whereas I am using ââself.ââ I am going to go through the file now and change them see if that works and I will get back to you.
I think that shouldnât make any difference. As long as the super class is initialized and the super class is or contains showbase, then the global variable base should be defined.
Looks like I should have, I changed it over to ShowBase.__init__(self) and it is now working and didnât have to change from base. , but is stuck in the jumping animation, Iâm guessing due to me having a floor with no collider?
Iâll note that if âbaseâ werenât defined, you should be getting a different error message. Specifically, the interpreter wouldnât be getting as far as assessing âphysicsMgrâ and finding it to be âNoneââit would presumably be tripping over âbaseâ.