Open ThePhantomMask opened 6 months ago
I'm not familiar using c# with the mono build of Godot, do you get any errors when trying to make "SDLGyro.new()" from a C# script?
From what i know functions added by GDextention should behave as regular built-in Godot functions.
It just doesn't work, I think it must be made on purpose the combinability.
Yes apparently it is true, but there is not much official documentation around it, just discussions and proposed solutions, i will take a look and post here if there is any progress, if you find anything that could be helpful feel free to link it.
And then on the GDScript side: I get this error: modules/gdscript/gdscript_compiler.cpp:121 - GDScript bug: Native class 'SDLGyro' not found.
sdl_mono_test.zip make sure you place the addons folder in the root of your project (here is an example i made with the mono build of godot but still using gdscript)
It works. For the .NET issue, there are some communities that might help you Chickensoft and CoaguCo Industries
getCalibratedGyro() and getProcessedAcceleration() these two methods do not seem to work.
Remember that is necessary to call gamepadPolling() for the other functions to work (like this):
...
func _process(_delta):
Gyro.gamepadPolling()
print(Gyro.getCalibratedGyro())
...
A suggestion: Integrating vectors (2/3/4) would be convenient via Godot's Vectors
could you elaborate on that?
Instead of the typed array you could use Vector2/3/4 of Godot
I tried it at first but, but gamepadMotionHelperes expected floats so i ended up using the Typed Array instead, i considered converting the array to a vector and returning it but didn't want to put more chain in the process. I will revisit this idea
OK...got it. Have you tried putting a vector that is initialised with the array data and then return the vector?
This is the exact thing i want to try, (i'm currently doing some freelance job, i will add this to the list on changes i have planed when i come back)
if you're in windows, inside this project folder you will have to make the libs folder and then the mingw_dev_lib folder inside of it, place the files and folders extracted from SDL2-X.XX.X\x86_64-w64-mingw32 there) i hope i was clear, maybe i should change this
Meanwhile on my fork I am trying to add Vector3 and 4
if you're in windows, inside this project folder you will have to make the libs folder and then the mingw_dev_lib folder inside of it, place the files and folders extracted from SDL2-X.XX.X\x86_64-w64-mingw32 there) i hope i was clear, maybe i should change this
But within src folder?
no no, in the root of your project, take a look:
no no, in the root of your project, take a look:
Then I have to put the folder with all the SDL2 functions on src, right? But how to solve a fatal error where it is impossible to open SDL2.lib how do I do it?
Is there also the possibility of adding support for .NET/C# programming in addition to GDScript?