Post not yet marked as solved
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!
Post not yet marked as solved
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.
Post not yet marked as solved
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
Post not yet marked as solved
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.
Post not yet marked as solved
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?