Post AX4fATEe689GBe7gnI by zhuowei@notnow.dev
 (DIR) More posts by zhuowei@notnow.dev
 (DIR) Post #AWxyWsM1RLZZQQZoZs by jjtech@infosec.exchange
       2023-06-22T18:35:01Z
       
       0 likes, 0 repeats
       
       @zhuowei Any luck yet? I think that the way to do it might be in the xrOS .simdeviceui? I'm not having great luck with it because I'm bad with Swift stuff, but I'm seeing all the interactions (hover, orbit, etc)...and it seems to be interacting with a standard RealityKit CameraPerspective somehow hooked into the simulator?
       
 (DIR) Post #AWxyWtAMQBq3wY812W by zhuowei@notnow.dev
       2023-06-23T00:36:11.749420Z
       
       0 likes, 0 repeats
       
       @jjtech Ask @ShinyQuagsire who was looking into this.> Library Validation is in my way.. maybe turn SIP off?
       
 (DIR) Post #AWxyWuGQL8HbLdyN84 by jjtech@infosec.exchange
       2023-06-22T19:42:09Z
       
       0 likes, 0 repeats
       
       @zhuowei Well, I tried just replacing the .simdeviceui with one I compiled, but ofc Library Validation is in my way...Not sure what the cleanest way around it is, either resigning the simulator with the disable library validation entitlement or see if I can somehow create something to patch it in at runtime...EDIT: Just realized that sudo defaults write /Library/Preferences/com.apple.security.libraryvalidation.plist DisableLibraryValidation -bool true still works, for some reason I thought that was removed. Yay!
       
 (DIR) Post #AWxyrRkvWk4p0t2CuW by zhuowei@notnow.dev
       2023-06-23T00:39:54.854373Z
       
       0 likes, 0 repeats
       
       @jjtech oh wait SIP isn't tied to library validation. Oh well; I assume lldb can still attach...
       
 (DIR) Post #AX0APcfSx0qeVuto1I by ShinyQuagsire@mastodon.social
       2023-06-23T00:58:16Z
       
       0 likes, 0 repeats
       
       @zhuowei @jjtech yeah probably same procedure as yabai, so SIP and some other flag off.
       
 (DIR) Post #AX0APdcfOuCfTWb5IO by jjtech@infosec.exchange
       2023-06-23T00:59:22Z
       
       0 likes, 0 repeats
       
       @ShinyQuagsire Yeah, I figured that part out. When I try and replace it, I now get an error like this...Failed to load simdeviceui bundle for device SimDevice : Apple Vision Pro (E6C5AC55-1A25-40D7-ABBD-1799DF149581) : state={ Booted } deviceType={ com.apple.CoreSimulator.SimDeviceType.Apple-Vision-Pro: SimDeviceType : Apple Vision Pro (com.apple.CoreSimulator.SimDeviceType.Apple-Vision-Pro) } runtime={ com.apple.CoreSimulator.SimRuntime.xrOS-1-0: SimRuntime : visionOS 1.0 (1.0 - 21N5165g) - com.apple.CoreSimulator.SimRuntime.xrOS-1-0 }: The operation couldn’t be completed. (SimulatorKit.SimDeviceUserInterface.LoadError error 1.)Not sure how to debug it, "error 1" isn't very useful...
       
 (DIR) Post #AX0APeJYpQVxcYfL9c by jjtech@infosec.exchange
       2023-06-23T18:13:43Z
       
       0 likes, 1 repeats
       
       @ShinyQuagsire @zhuowei I now have https://github.com/JJTech0130/XRGyroControls loading! Now I need to actually implement functionality, but I at least know my functions are being called.(The Xcode project is a mess, as usual, so it probably won't build for anyone not on my machine...)
       
 (DIR) Post #AX4ev3myQNZKvGpbZg by keithahern@mastodon.social
       2023-06-25T09:22:59Z
       
       0 likes, 0 repeats
       
       @jjtech @ShinyQuagsire @zhuowei I’m hoping this is better than my hacky mouse based approach, I couldn’t get the HID based approach working, I want to stream from an AR headset.
       
 (DIR) Post #AX4ev4sKNxRiIALOYi by jjtech@infosec.exchange
       2023-06-25T12:55:06Z
       
       0 likes, 0 repeats
       
       @keithahern @ShinyQuagsire @zhuowei Well, I'm making progress. I actually think I'm managing to send HID messages, though there isn't any reaction right now because the messages are nonsense.It's a bit slow since I barely understand SIMD stuff, and the poses do complicated math with it, but I think I should be able to get something that just resends pre-calculated messages soon enough.
       
 (DIR) Post #AX4ev5fFS4ZsjtESoK by jjtech@infosec.exchange
       2023-06-26T04:22:34Z
       
       0 likes, 1 repeats
       
       @keithahern @ShinyQuagsire @zhuowei Ok, definitely making progress. XRGyroController can now flip camera directions on a timer. I need to figure out the actual pose math, but for now it can replay   the final bytes and get it to go to that position!EDIT: WOW, I was dumb. All the complicated maths was irrelevant. Format is literally X, Y, Z, 1.0, Pitch, Yaw, Roll, 1.0EDIT2: :tada: XRGyroControls can now tell it to go to an arbitrary XYZPYR pose. Next step, the pointer.
       
 (DIR) Post #AX4fATEe689GBe7gnI by zhuowei@notnow.dev
       2023-06-26T06:02:10.735467Z
       
       0 likes, 0 repeats
       
       @jjtech @keithahern @ShinyQuagsire I wonder - if it's just a simd4x4 transformation matrix, you might be able to just slot in a HMD's pose matrix directly. I assume it's the same format as an ARKit position (https://developer.apple.com/documentation/compositorservices/4131588-cp_drawable_get_ar_pose?language=objc)?
       
 (DIR) Post #AX4fzx7ElKqvd1CqPI by zhuowei@notnow.dev
       2023-06-26T06:11:31.452513Z
       
       0 likes, 0 repeats
       
       @jjtech @keithahern @ShinyQuagsire Huh. I haven't looked into this, but 8 floats (write_simd_bytes) seems too small for a 4x4 transformation matrix. Is it a quaternion (simd_quatf)? Could you make a rotation with simd_quaternion and dump that into your write_simd_bytes?