Game Controller

RSS for tag

Support hardware game controllers in your game using Game Controller.

Game Controller Documentation

Posts under Game Controller tag

24 Posts
Sort by:
Post marked as Apple Recommended
28k Views
I tried to connect my xbox controller to my MacBook, even though the controller is registered in bluetooth setting, but it doesn't function at all. Have anyone met the same problem and if there's a fix for this problem
Posted
by
Post not yet marked as solved
1 Replies
802 Views
Hey there I have been trying to temporarily implement t GCVirtualController for a game I am working on but having trouble when it comes to portrait mode. Right now I have a D-Pad with 2 side buttons on the left side and then a 4 button pad on the right side when in landscape. However when I switch to portrait mode, only the buttons on the right side are visible. I was wondering if it is possible to show both sides when in portrait mode if anyone could help! Thank you
Posted
by
Post not yet marked as solved
5 Replies
1.4k Views
hey if i wanted to create an app that takes screenshots from an apple device (and any app within) to give context to an ai so the ai can then respond. Then the app parses the response then executes commands on behalf of the ai/user, how would I do so with the rule that "screenshots/captures are not allowed within other apps"? Want to stay within bounds of the rules in place. Possibilities: Ai assistant, Ai pals, passive automation
Posted
by
Post not yet marked as solved
1 Replies
688 Views
I got a new MacBook pro a month ago (M2) and today is my first time pairing it with my PS4 controller. The pairing is successful, but my Macbook starts recognising my controller as my mouse. e.g. I can't choose anything with "X" in-game because it just keeps opening random apps on my laptop. I tried to turn off the configurations on Steam but it's still the same. How do I use my controller configurations in-game only and refrain my laptop from picking up actions? I used my controller for gaming with my old Macbook, and I never had any issues, the controller could only be used in games and Steam only.
Posted
by
Post not yet marked as solved
4 Replies
1.1k Views
I have noticed that external keyboards connected to an Apple computer support the simultaneous pressing of 'Tab + W + Space' keys, but the in-built Apple keyboard does not. When I press the 'Tab + W' keys and then press the Space bar, the Apple computer only receives the 'Tab + W' events but not the Space event. Other combinations, such as 'Tab + A + Space', work normally. Can you please explain why this is the case and provide any solutions or advice? Thank you
Posted
by
Post not yet marked as solved
0 Replies
730 Views
Hello, I want to connect my mouse to my iPad pro m2 and play PUBG mobile, but I cannot lock the mouse to the screen so I can use the mouse to turn my character and play the game. I was wondering how I could do that. I also watched a video on GCControler and GCmouse but I don't understand how to code that information into my iPad.
Posted
by
Post not yet marked as solved
0 Replies
726 Views
Hello! I have a DJI MAVIC 3 drone and recently I got a stimulator to practice my flying skills but I have a problem, even tho my Mac Book recognizes the controller, I still can't use it to practice, it just shows like there is no controller connected. The stimulator I am using is Uncrashed FPV Drone, but I also tried to test it on DJI Assistance 2, can someone help me fix this issue please.
Posted
by
Post not yet marked as solved
1 Replies
673 Views
I'm working on an Immersive game that requires Controller input. The Happy Beam sample is supposed to support hand tracking and controller input. I have tested the controller input with a PS5 Dual Sense controller and all I can do is move around the scene while the game plays. But cannot interact with anything in the scene. Can anyone confirm this and or suggest how I can use a controller in an immersive space? I cannot find a single working example.
Posted
by
Post not yet marked as solved
1 Replies
770 Views
Hey all. I took a look at a video that caught my attention(https://developer.apple.com/videos/play/wwdc2021/10081) and wish to use this for my ios and iPad game. However, the language used here is swift, and want to use either objective-c or c++. Did anyone here used this method shown is this video but without swift?
Posted
by
Post not yet marked as solved
1 Replies
525 Views
When I am setting up a profile on my PS5 controller to remap the buttons to play Roblox, but it doesn't change anything or worse it makes it malfunction.
Posted
by
Post not yet marked as solved
0 Replies
689 Views
While my GPTK setup works fine with games like Rocket League, any Unity made game will freeze when a joystick input is given. I've tested this with 'Zeepkist' and 'Engine Evolution 2021', both have full steam controller support enabled. If I run the GPTK game in foreground, right after moving the joystick, this error is logged: 0bac:fixme:rawinput:rawinput_from_hardware_message Unhandled rawinput type 0x100 This only happens when Steam is running. For example, running the 'Zeepkist' .exe manually while Steam is NOT RUNNING, the controller works fine! Most of the time this results in a crash throwing: 0bbc:fixme:dbghelp:SymLoadModuleExW Unsupported Flags 00000005 for (null) 0bbc:fixme:dbghelp:SymLoadModuleExW Unsupported Flags 00000005 for (null) 0bbc:fixme:dbghelp:SymRegisterFunctionEntryCallback64 (0000000000000084 0000000140036E50 2508e0): stub! wine: Unhandled page fault on read access to 0000001BFFFFFFE4 at address 000000006E73B991 (thread 0bac), starting debugger... 0bbc:fixme:file:CancelSynchronousIo (000000000000007C): stub 0810:fixme:imm:ImeSetActiveContext (0x36ed10, 1): stub 0810:fixme:imm:ImmReleaseContext (000000000009020A, 000000000036ED10): stub I would love to play Unity games using GPTK. Please suggest any tips/tricks to resolve this issue.
Posted
by
Post not yet marked as solved
2 Replies
639 Views
Hi, I was working on implementation of game controller input to my game. I've connected my Xbox controller and tried to do a test and it is working in an macOS application. I wanted to port it to my visionOS app but the app can't seem to recognize my gamepad inputs. But visionOS simulator can recognize because it is changing camera by gamepad input. According to documentation GCController functions supports visionOS. Do the apps directly supports GC input? Or do I make mistake in my code? Thanks
Posted
by
Post not yet marked as solved
4 Replies
645 Views
Dear support We are developing a Bluetooth Low Energy HID Gamepad and are having issues connecting it to iOS devices (iPhone). Pairing is always successful. The issue is related to the PnP ID used. If we use a PnP ID for a gamepad currently on the market - like a Google Stadia - there is no issue. The Gamepad connects (pairs) with the iPhone and is recognised in the iPhone "settings->general->game controller" Also if a "Game Controller Tester" APP is installed on the iPhone this works ok. If we use our own PnP the Gamepad connects (pairs) but iPhone does not recognise it in "settings->general->game controller" . Also the "Game Controller Tester" APP does not work. The question is :- Is there something we need to do with our own PnP for it to be recognised by iOS devices. For info - on Android and Windows our PnP is recognised ok - we can control a Game Controller APP with it. The issue is only with Apple iOS devices. Any help would be welcome. Thanks JESP
Posted
by
Post marked as solved
1 Replies
640 Views
I tried to update my current game controller code to the new iOS 17.0 GCControllerLiveInput. But the Touchpads of the PS4 and PS5 controllers are not listed as elements of the GCControllerLiveInput. Were they moved somewhere else? They are not listed as a GCMouse, and I didn't find anything about this in the documentation or header files either...
Posted
by
Post not yet marked as solved
1 Replies
409 Views
I am using GCSystemGestureStateDisabled to suppress home button being capture by gesture recognizer so the system menu is not triggered while my app is using the gamepad. It was working well on macOS 14.1 but stop working after I migrated to 14.2. boundToSystemGesture is still showing "Yes" after button.preferredSystemGestureState = GCSystemGestureStateDisabled is assigned. Is it possible some change was introduced on 14.2 causing the issue?
Posted
by
Post not yet marked as solved
0 Replies
347 Views
I have my Xbox Controller plugged into my Macbook, but my controller won't stay on (no batteries are needed for this controller, and the plug I am using works). Also in system settings when I scroll to Xbox Controllers it says no devices found. How do I fix this?
Posted
by
Post not yet marked as solved
0 Replies
446 Views
Hi Apple and Swift friends. I'm not really a fluent Swift programmer (or any language) just knowledgable, I just a vague logic of what's going on. This is a gamepad controller remapper similar to DS4Windows on the PC and DSX on Steam gaming. On macOS Sonoma, it successfully compiled and connected the amazing Sony Playstation DualSense but because it has 33 yellow warning, the Setting doesn't show. It says something about outdated something and needs to be replaced by a newer framework.network. It also says it can't use self: It should look like these: What could be the syntax changes that won't produce the 30+ yellow warnings? The file can be had here: [https://github.com/marcowindt/ds4macos) God bless.
Posted
by
Post not yet marked as solved
0 Replies
445 Views
Hi guys, Since SwiftUI is not completely suporting tvOS remote and swipe/pan gestures (targeting tvOS 16 and higher, using Xcode 15.1 and its tvOS SDK), I have implemented custom remote control handling using GameController framework and GCController class to detects Siri Remote (1st and 2nd generation), iOS Remote (tvOS remote controller on iPhone) and Nimbus+ and PS game controllers. For video streaming app I specifically needed to handle arrows on old Siri remote and new Siri remote the same way - arrow press (not just touch) switches TV channel. In the standard SwiftUI remote control handling the arrow presses are triggered on old remote just by touching edges of the touch pad. We use Up/Down arrow presses to switch TV channel. Our testers reported that they too often accidentally change channel when picking up remote or simply laying down finger on the pad in preparation to use the remote for some action. That's why we needed to override default behavior on old remote and detect arrow press only when user touches the edge and "clicks" the touch pad. Simultaneously we detect input from all controllers, because for example when you have Nimbus game controller connected it becomes current controller - it is set in GCController.current - while we still need to handle Siri remote, so user didn't have to turn off Game controller and could just pick up the Siri remote and use it right away. But there are still some problems. For example if I open tvOS remote control app on iPhone it has higher priority over Siri remote. Although I'm able to hold iPhone in one hand and Siri remote in the other and use them simulatanously, pressing down arrow buttons on Siri remote triggers event, which is being detected as if it came from iOS remote. This problem occurs even if user locks iPhone while remote app is active. User has to unlock iPhone and minimize iOS remote to fix the problem and make Siri remote fully active controller with arrows working as expected. Is there a way of detecting from which remote the button press event came? GCController.current reports that iOS remote is current controller, notification GCControllerDidConnect and GCControllerDidBecomeCurrent does not help either. When I use iOS remote it becomes current controller and when I start using Siri remote and press button it does not become current controller. GCController.physicalInputProfile does not help either. It is as if iOS remote while being connected to tvOS has higher priority over Siri remote. Why don't I receive current controller change when pressing button on Siri remote? When pressing the button on Siri remote and receiving event, it comes from handler with GCController.microGamepad.elements.count == 10, instead of 17, so although I'm pressing button on Siri remote I'm getting events as if I pressed button on old remote (or iOS remote which is handled as old Siri remote). Even button.controller instance is wrong and holds a reference to iOS remote instead of the correct new Siri remote. I tried to look at button.aliases to see if I find "Cardinal Direction", which would hint at arrow press on new controller, but it does not contain this type of alias. I'm trying to find some hack for detection of currently used Siri remote, but without any success. It looks like somewhere in the core the GCController converts button presses to more generic events making the button presses anonymous (losing hardware info). But clearly the low level code must see from which controller the button press came. Any idea if there is a way of detecting from which remote controller the button press came?
Posted
by