Tap into virtual and physical game controllers

RSS for tag

Discuss the WWDC21 session Tap into virtual and physical game controllers.

Posts under wwdc21-10081 tag

5 Posts

Post

Replies

Boosts

Views

Activity

How to use GCVirtualController directly with SKScene?
GCVirtualController isn't displaying when used with SKScene class. The Virtual controllers appear but then it seems that they are obscured by the SKScene itself!? The documentation says that calling connect() will display the virtual controllers but I seem to be missing how to add the controllers to the SKScene? class GameScene: SKScene { private var _virtualController: Any? @available(iOS 15.0, *) public var virtualController: GCVirtualController? { get { return self._virtualController as? GCVirtualController } set { self._virtualController = newValue } } override func didMove(to view: SKView) { let background = SKSpriteNode(imageNamed: ".jpg") background.zPosition = -1 addChild(background) let virtualConfig = GCVirtualController.Configuration() virtualConfig.elements = [GCInputLeftThumbstick, GCInputRightThumbstick, GCInputButtonA, GCInputButtonB] virtualController = GCVirtualController(configuration: virtualConfig) virtualController?.connect() } } I've also tried adding the virtual controllers in the UIViewController but this doesn't work either.
5
0
2.4k
Jun ’24
GCVirtualController -- Left elements do not appear when using portrait mode
I'm trying to use GCVirtualController in an app and am running into an apparent bug when trying to use it in portrait mode. If I create "left side" and "right side" elements such as a left analog stick and right analog stick, things appear as expected when in landscape mode. When I switch to portrait mode only the right side elements appear. This doesn't appear to be a documented limitation and I'd like to be able to use the GCVirtualController in both orientations. Any advice? Is this just a bug or an intentional design limitation.
0
0
666
Dec ’21
GCVirtualController -- Unable to customize appearance of analog sticks with a custom UIBezierPath
GCVirtualController supports setting a UIBezierPath for configuring controller elements. This seems to work fine for things like A/B/X/Y buttons but it seems to be silently ignored when trying to set against the analog stick elements. This doesn't seem to be a documented limitation. Is this just a bug in GCVirtualController or an intentional limitation?
0
0
973
Dec ’21
Haptic Grip Support for Sony DualSense Game Controller Grips?
Is there support for playing custom haptic files to the grips of Sony's DualSense Game Controller? The video mentions supporting the adaptive triggers on the DualSense. We are not finding a way to reference the haptic actuators in the grips. We'd like to play custom haptic files to them as well as audio to the speaker inside the DualSense. Searched the WWDC21 content as well as the documentation. Have not found the answer yet. Thank you!
1
0
1.5k
Sep ’21
How to use GCVirtualController directly with SKScene?
GCVirtualController isn't displaying when used with SKScene class. The Virtual controllers appear but then it seems that they are obscured by the SKScene itself!? The documentation says that calling connect() will display the virtual controllers but I seem to be missing how to add the controllers to the SKScene? class GameScene: SKScene { private var _virtualController: Any? @available(iOS 15.0, *) public var virtualController: GCVirtualController? { get { return self._virtualController as? GCVirtualController } set { self._virtualController = newValue } } override func didMove(to view: SKView) { let background = SKSpriteNode(imageNamed: ".jpg") background.zPosition = -1 addChild(background) let virtualConfig = GCVirtualController.Configuration() virtualConfig.elements = [GCInputLeftThumbstick, GCInputRightThumbstick, GCInputButtonA, GCInputButtonB] virtualController = GCVirtualController(configuration: virtualConfig) virtualController?.connect() } } I've also tried adding the virtual controllers in the UIViewController but this doesn't work either.
Replies
5
Boosts
0
Views
2.4k
Activity
Jun ’24
GCVirtualController -- Left elements do not appear when using portrait mode
I'm trying to use GCVirtualController in an app and am running into an apparent bug when trying to use it in portrait mode. If I create "left side" and "right side" elements such as a left analog stick and right analog stick, things appear as expected when in landscape mode. When I switch to portrait mode only the right side elements appear. This doesn't appear to be a documented limitation and I'd like to be able to use the GCVirtualController in both orientations. Any advice? Is this just a bug or an intentional design limitation.
Replies
0
Boosts
0
Views
666
Activity
Dec ’21
GCVirtualController -- Unable to customize appearance of analog sticks with a custom UIBezierPath
GCVirtualController supports setting a UIBezierPath for configuring controller elements. This seems to work fine for things like A/B/X/Y buttons but it seems to be silently ignored when trying to set against the analog stick elements. This doesn't seem to be a documented limitation. Is this just a bug in GCVirtualController or an intentional limitation?
Replies
0
Boosts
0
Views
973
Activity
Dec ’21
'GCVirtualController?' has no member 'changeElement'
In the example code:- vc.changeElement(GCInputButtonA) { I get the error. Value of type 'GCVirtualController?' has no member 'changeElement' I thought the vc reference was view controller but this did not work. Any help would be great. Thanks in advance
Replies
1
Boosts
0
Views
1.3k
Activity
Oct ’21
Haptic Grip Support for Sony DualSense Game Controller Grips?
Is there support for playing custom haptic files to the grips of Sony's DualSense Game Controller? The video mentions supporting the adaptive triggers on the DualSense. We are not finding a way to reference the haptic actuators in the grips. We'd like to play custom haptic files to them as well as audio to the speaker inside the DualSense. Searched the WWDC21 content as well as the documentation. Have not found the answer yet. Thank you!
Replies
1
Boosts
0
Views
1.5k
Activity
Sep ’21