Skip to content

iCade Bluetooth plugin for my VR headset release not triggering #3

Description

@fuzzballb

Recently I bought this (http://www.aliexpress.com/snapshot/7303176176.html?orderId=72644423960078) VR headset that comes with a Bluetooth controller.

While button presses are registered on iOS and passed through to Unity, button releases are not. Infect, when I press up, all events are triggered (GetKeyDown, GetKeyUp, GetKey) which should not be de case, and when I release no events are triggered.
My guess is that something is going wrong in the Objective-C code that parses the event to Unity, or my device is not compatible. Am i doing something wrong?

Greetings
FuZZbaLL_b

In Unity

if (Input.GetKeyDown (KeyCode.JoystickButton4)) {
Debug.Log ("Input.GetKeyDown KeyCode.JoystickButton4");
}
if (Input.GetKeyUp (KeyCode.JoystickButton4)) {
Debug.Log ("Input.GetKeyUp KeyCode.JoystickButton4");
}
if (Input.GetKey (KeyCode.JoystickButton4)) {
Debug.Log ("Input.GetKey KeyCode.JoystickButton4");
}

Debug Log

2016-02-23 07:49:08.449 ProductName[509:90021] Button Release!
2016-02-23 07:49:15.183 ProductName[509:90021] Button Press!
Input.GetKeyDown KeyCode.JoystickButton4
Engine:Update()
System.Collections.Generic.ICollection1:Remove(T) System.Collections.Generic.ICollection1:Remove(T)
System.Collections.Generic.ICollection`1:Remove(T)
(Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/UnityEngineDebugBindings.gen.cpp Line: 37)
(button press triggers everything and release doesn't trigger anything)

UPDATE

I don't think this is an issue with the iCade plugin, but it is probebly my controler that is causing this. The reason i use iCade plugin is because it is the only one i found that gave me a response in unity. I fixed my issue by sending button presses of buttons i don't use, when i release my thumbstick. it's a bit hacky, but it works for my demo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions