SagaPDev / Godot-SDL-Gyro

Add Gamepad Gyro Funtionality to Godot
MIT License
26 stars 3 forks source link

Not sure what im doing wrong. #12

Closed TheGlobalGuest closed 2 months ago

TheGlobalGuest commented 2 months ago

Hi! I've been all over the place looking for a way to do gyrocontrols in godot so i can recreate the tub tilting effect from "Super Rub A Dub". After alot of looking i've come across this github page.

Unfortunately im still inept and haven't done much outside of GDscript so i don't know what i've done wrong when following the guide.

https://github.com/user-attachments/assets/6d6c67a0-c4de-42f2-817d-1dbe0fdfecf6

can i have some help in pointing out where i went wrong? although i do understand if what i gave isn't enough.

SagaPDev commented 2 months ago

you seem to have the source code there, (even then i still don't understand why it can't correctly open the add-on from there) either way this this is the extension itself you can extract and drop in your project, i think this is what you need, let me know of any this gives you trouble, as you can see, there are still things to iron out

TheGlobalGuest commented 2 months ago

I changed the library to the https://github.com/SagaPDev/Godot-SDL-Gyro/commit/12f7fe67e95d2b94df44e86cd47aea887cad216b version (since the other one still gave the "Library not found" error) and it now loads with no errors. but still has some side effects in the way:

  1. for some reason there is a loooong wait time when starting

  2. gamepadPoling() and the functions that requre it gives an error

https://github.com/user-attachments/assets/5d4ec7b1-c7c7-47b5-b77d-c60a33596f1c

just as a note, apart from the changes i've shown in both vids the file is unchanged from the github one.

TheGlobalGuest commented 2 months ago

I thougth I would drop the current project file here incase im just missing out something i don't know. gyro stuff copy.zip

SagaPDev commented 2 months ago

Hi! I've been all over the place looking for a way to do gyrocontrols in godot so i can recreate the tub tilting effect from "Super Rub A Dub". After alot of looking i've come across this github page.

Unfortunately im still inept and haven't done much outside of GDscript so i don't know what i've done wrong when following the guide. 2024-08-07.14-33-36.mp4

can i have some help in pointing out where i went wrong? although i do understand if what i gave isn't enough.

ok now i understand what happened here, what you got there is a copy of the source code but the addon is not build

I changed the library to the 12f7fe6 version (since the other one still gave the "Library not found" error) and it now loads with no errors. but still has some side effects in the way:

1. for some reason there is a loooong wait time when starting

2. gamepadPoling() and the functions that requre it gives an error

2024-08-08.10-36-09.mp4

just as a note, apart from the changes i've shown in both vids the file is unchanged from the github one.

and this here is the source code with the latest commits, changes were made to functions names, the instructions in the readme only refer to the "releases" i posted, further more the "aimtest" is just some piece of unfinished code that was meant for testing

I strongly suggest you download the latest Release and extract the 'addons` folder in the root of your project (it is also now linked directly in the README)

And also i uploaded my example project by itself, this should help you understand how the addon is used, in fact if you just replace the controller 3D model, with a level, you basically have the basis for the game you want

Again you don't need the whole source code, just the "addons" folder linked Here -> Release placed in the root of your own project

TheGlobalGuest commented 2 months ago

I tested your exsample project, added the ">|" to the test script and it works now!

https://github.com/user-attachments/assets/165d7e59-01c6-4003-a942-99528dd03a1c

there is some drift when calibrating but i think thats more because of the dualshock 4 im using (also the loooong loading times is just from the godot version im using)

thank you very much for taking time out of your day to help me! :D