Is there way to access controller transform from InputEventData?
I'm trying to write a simple grabbing mechanics script that set a gameobject is child of the controller when a controller. Currently I access the controller transform on OnTriggerEnter but the problem is the most recent controller that enter the gameobject trigger is not the one that sends most recent input.
Is there a way to access controller transform from InputEventData? If not, I guess I can use InputEventData.Handedness to find which controller fired the input but I still don't know how to access the controller transform. Thanks!
The input data is the pure data coming from the device itself. To get the controller transform you'll need to get it's visualizer. It's been a while, and the code may have changes since I last seen it, but you should be able to query the input system for the controller by its input source id, and then access the visualizer that way.
Thanks for responding. I was not able to find a way to query for controller with input source id, but I can use ControllerFinder to work around that.