Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

[Released] gInputControllers - multi joystick and force feedback manager

Discussion in 'Assets and Asset Store' started by ghiboz, Aug 9, 2017.

  1. LIVAI10

    LIVAI10

    Joined:
    Nov 4, 2019
    Posts:
    7
    Edit : I don't have the device actually.. i'll send u a new GIC.log content later tomorrow..

    Sure ! Sample !

    GIC.log content :


    [2022-02-14 17:31:12.169] [gInput logging] [info] gInput Initialization
    [2022-02-14 17:31:12.174] [gInput logging] [info] nitInputSystem gInputTest true
    [2022-02-14 17:31:12.174] [gInput logging] [info] InitInputSystem v2 35654394
    [2022-02-14 17:31:12.174] [gInput logging] [info] InitDirectInput
    [2022-02-14 17:31:12.207] [gInput logging] [info] InitDirectInput step 01
    [2022-02-14 17:31:12.454] [gInput logging] [info] InitDirectInput step 02
    [2022-02-14 17:31:12.454] [gInput logging] [info] InitKey
    [2022-02-14 17:31:12.460] [gInput logging] [info] InitKey END 0
    [2022-02-14 17:31:12.460] [gInput logging] [info] InitDirectInput step 03
    [2022-02-14 17:31:12.495] [gInput logging] [info] InitDirectInput step 04
    [2022-02-14 17:31:12.495] [gInput logging] [info] InitDirectInput step 05
    [2022-02-14 17:31:12.495] [gInput logging] [info] InitDirectInput step 06
    [2022-02-14 17:31:12.495] [gInput logging] [info] InitDirectInput step 07
    [2022-02-14 17:31:12.495] [gInput logging] [info] InitDirectInput END 0
    [2022-02-14 17:31:17.886] [gInput logging] [info] gLog ends job!
     
  2. ghiboz

    ghiboz

    Joined:
    Sep 7, 2012
    Posts:
    465
    what kind of device you have?
    in this log there is no device attached, right?
     
  3. LIVAI10

    LIVAI10

    Joined:
    Nov 4, 2019
    Posts:
    7
    Thanks for your time..

    It work in a build, but not in the editor now ..

    The log is from the build (but of course in a build it work now!) .. :

    [2022-02-14 17:31:12.169] [gInput logging] [info] gInput Initialization
    [2022-02-14 17:31:12.174] [gInput logging] [info] nitInputSystem gInputTest true
    [2022-02-14 17:31:12.174] [gInput logging] [info] InitInputSystem v2 35654394
    [2022-02-14 17:31:12.174] [gInput logging] [info] InitDirectInput
    [2022-02-14 17:31:12.207] [gInput logging] [info] InitDirectInput step 01
    [2022-02-14 17:31:12.454] [gInput logging] [info] InitDirectInput step 02
    [2022-02-14 17:31:12.454] [gInput logging] [info] InitKey
    [2022-02-14 17:31:12.460] [gInput logging] [info] InitKey END 0
    [2022-02-14 17:31:12.460] [gInput logging] [info] InitDirectInput step 03
    [2022-02-14 17:31:12.495] [gInput logging] [info] InitDirectInput step 04
    [2022-02-14 17:31:12.495] [gInput logging] [info] InitDirectInput step 05
    [2022-02-14 17:31:12.495] [gInput logging] [info] InitDirectInput step 06
    [2022-02-14 17:31:12.495] [gInput logging] [info] InitDirectInput step 07
    [2022-02-14 17:31:12.495] [gInput logging] [info] InitDirectInput END 0
    [2022-02-14 17:31:17.886] [gInput logging] [info] gLog ends job!
    [2022-02-15 18:47:15.617] [gInput logging] [info] gInput Initialization
    [2022-02-15 18:47:15.620] [gInput logging] [info] nitInputSystem gInputTest true
    [2022-02-15 18:47:15.621] [gInput logging] [info] InitInputSystem v2 203124
    [2022-02-15 18:47:15.621] [gInput logging] [info] InitDirectInput
    [2022-02-15 18:47:15.626] [gInput logging] [info] InitDirectInput step 01
    [2022-02-15 18:47:15.799] [gInput logging] [info] InitDirectInput step 02
    [2022-02-15 18:47:15.799] [gInput logging] [info] InitKey
    [2022-02-15 18:47:15.805] [gInput logging] [info] InitKey END 0
    [2022-02-15 18:47:15.805] [gInput logging] [info] InitDirectInput step 03
    [2022-02-15 18:47:15.818] [gInput logging] [info] Enum Joy #0
    [2022-02-15 18:47:15.818] [gInput logging] [info] Name: TS-XW Racer
    [2022-02-15 18:47:15.821] [gInput logging] [info] Callback_01 0
    [2022-02-15 18:47:15.821] [gInput logging] [info] Callback_02 0
    [2022-02-15 18:47:15.821] [gInput logging] [info] Callback_03 0
    [2022-02-15 18:47:15.821] [gInput logging] [info] ObjCallback_01 0
    [2022-02-15 18:47:15.821] [gInput logging] [info] ObjCallback_01 0
    [2022-02-15 18:47:15.821] [gInput logging] [info] ObjCallback_01 0
    [2022-02-15 18:47:15.821] [gInput logging] [info] ObjCallback_01 0
    [2022-02-15 18:47:15.822] [gInput logging] [info] Callback_04 0
    [2022-02-15 18:47:15.822] [gInput logging] [info] FF found!
    [2022-02-15 18:47:15.981] [gInput logging] [info] Callback_05 0
    [2022-02-15 18:47:16.002] [gInput logging] [info] InitDirectInput step 04
    [2022-02-15 18:47:16.002] [gInput logging] [info] InitDirectInput step 05
    [2022-02-15 18:47:16.004] [gInput logging] [info] InitDirectInput step 06
    [2022-02-15 18:47:16.004] [gInput logging] [info] InitDirectInput step 07
    [2022-02-15 18:47:16.004] [gInput logging] [info] Some FF is attached at #0
    [2022-02-15 18:47:16.004] [gInput logging] [info] Effect started at #0
    [2022-02-15 18:47:16.004] [gInput logging] [info] InitDirectInput END 0
    [2022-02-15 18:49:15.768] [gInput logging] [info] gLog ends job!
     
  4. LIVAI10

    LIVAI10

    Joined:
    Nov 4, 2019
    Posts:
    7
  5. Jalkku

    Jalkku

    Joined:
    Jan 1, 2014
    Posts:
    8
    Occasionally does not recognize some controllers. Sometimes restarting the game helps, sometimes not. Any clue how to fix? They are not logged into either of the log files.
     
  6. malak

    malak

    Joined:
    Jan 23, 2014
    Posts:
    67
    Hello , is it working for moza R9 base ?
     
  7. ghiboz

    ghiboz

    Joined:
    Sep 7, 2012
    Posts:
    465
    yes, it works!

    photo_2023-04-12_23-40-54.jpg
     
  8. MaxDeveloping

    MaxDeveloping

    Joined:
    Nov 30, 2019
    Posts:
    5
    Heyo ghiboz, do you know what could be the reason for gic to not show any input devices? It does detect the device being plugged and unplugged but doesn't show them in the devicelist.
     
  9. joelprogrammer

    joelprogrammer

    Joined:
    Oct 15, 2020
    Posts:
    7
    Good morning,
    ginput controller recognizes my t248 thrusmater steering wheel well but how to make it vibrate.
    I am a beginner thank you very much for your help.
     
  10. ghiboz

    ghiboz

    Joined:
    Sep 7, 2012
    Posts:
    465
    to vibrate I suggest to use a function like `sin` or `cos` and send the value to the feedback, you can change frequency and magnitude of the `sin` to make it vibrate as you like
     
  11. joelprogrammer

    joelprogrammer

    Joined:
    Oct 15, 2020
    Posts:
    7
    I will try this way. But since I'm a beginner I might come back to you.
    I will still try to find it.
    thank you ghiboz
     
  12. joelprogrammer

    joelprogrammer

    Joined:
    Oct 15, 2020
    Posts:
    7
    i'm sorry but i dont understand.

    In first, where is the feedback value in the editor GIC.loader.
    I follow your explanations from your github to get button and axis values. It's ok but how to get value feedback and where do i have to search?
    In second, how send the value to the feedback?
    I try to undersrtand but it's not easy.

    ******Maybe do you have any documentation to use your interface? ********
    i would be very grateful.
    Thank you for your help.
     

    Attached Files:

    Last edited: May 25, 2023
  13. joelprogrammer

    joelprogrammer

    Joined:
    Oct 15, 2020
    Posts:
    7
    I managed to make my steering wheel vibrate with GIC.UpdateForceFeedback(0,value) and value=mathf Sin(fq*time.deltatime)*amplitude.
    THANKS ghiboz
     
  14. malak

    malak

    Joined:
    Jan 23, 2014
    Posts:
    67
    Hey my friend , i've just bought your asset and tried on new project but it doesn't detect my Moza R9 :(

    can you help me to detect it please ?
    i'm using unity 2021.3.15f

    EDIT: The name of project is crucial to work :)
     
    Last edited: Jun 5, 2023
  15. joelprogrammer

    joelprogrammer

    Joined:
    Oct 15, 2020
    Posts:
    7
    Hi,
    my computer shut down when i was playing on unity and since then i can't restart the game. i have the following errors. I emptied the caches on unity but still the same.
    Someone can help me? THANKS
    =================================================================
    Native Crash Reporting
    =================================================================
    Got a UNKNOWN while executing native code. This usually indicates
    a fatal error in the mono runtime or one of the native libraries
    used by your application.
    =================================================================

    =================================================================
    Managed Stacktrace:
    =================================================================
    at <unknown> <0xffffffff>
    at GIC:SetForce <0x00097>
    at GIC:UpdateForceFeedback <0x00032>
    at CarController:Update <0x004b2>
    at System.Object:runtime_invoke_void__this__ <0x00087>
    =================================================================
    Received signal SIGSEGV
    ---------------------------------
    Obtained 25 stack frames
    0x00007ffcb42685a9 (gInput) SetForce
    0x00000159ddd27518 (Mono JIT Code) (wrapper managed-to-native) GIC:SetForce (intptr,int,int)
    0x00000159ddd27453 (Mono JIT Code) [GIC.cs:267] GIC:UpdateForceFeedback (int,int)
    0x00000159ddcd8e63 (Mono JIT Code) [CarController.cs:389] CarController:Update ()
    0x000001598b670828 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
    0x00007ffca048feb4 (mono-2.0-bdwgc) [mini-runtime.c:3445] mono_jit_runtime_invoke
    0x00007ffca03ce764 (mono-2.0-bdwgc) [object.c:3066] do_runtime_invoke
    0x00007ffca03ce8fc (mono-2.0-bdwgc) [object.c:3113] mono_runtime_invoke
    0x00007ff7b0512794 (Unity) scripting_method_invoke
    0x00007ff7b04f1f94 (Unity) ScriptingInvocation::Invoke
    0x00007ff7b04db094 (Unity) MonoBehaviour::CallMethodIfAvailable
    0x00007ff7b04db182 (Unity) MonoBehaviour::CallUpdateMethod
    0x00007ff7affc59fb (Unity) BaseBehaviourManager::CommonUpdate<BehaviourManager>
    0x00007ff7affccdca (Unity) BehaviourManager::Update
    0x00007ff7b01e027d (Unity) `InitPlayerLoopCallbacks'::`2'::UpdateScriptRunBehaviourUpdateRegistrator::Forward
    0x00007ff7b01c68ba (Unity) ExecutePlayerLoop
    0x00007ff7b01c6a46 (Unity) ExecutePlayerLoop
    0x00007ff7b01ccb29 (Unity) PlayerLoop
    0x00007ff7b113ffb9 (Unity) PlayerLoopController::UpdateScene
    0x00007ff7b113e15b (Unity) Application::TickTimer
    0x00007ff7b159323a (Unity) MainMessageLoop
    0x00007ff7b1597b0b (Unity) WinMain
    0x00007ff7b2976cbe (Unity) __scrt_common_main_seh
    0x00007ffd04b67614 (KERNEL32) BaseThreadInitThunk
    0x00007ffd057026a1 (ntdll) RtlUserThreadStart
     
  16. joelprogrammer

    joelprogrammer

    Joined:
    Oct 15, 2020
    Posts:
    7
    After the crash, and after reinstalling the steering wheel and the gearbox, they were no longer in the same controller input order.
    By putting back in the right order, everything is ok.
     
  17. malak

    malak

    Joined:
    Jan 23, 2014
    Posts:
    67
    doesn't work anymore for me on new project :( runtime error and crash unity