godot-sdk-integrations / godot-ios-plugins

MIT License
139 stars 54 forks source link

ARKit-camera.project_ray_normal return wrong value #40

Open waci11 opened 1 year ago

waci11 commented 1 year ago

Stretch Mode = Viewport Stretch Aspect = Expand the result is offset to the center of the screen For example: The size of the viewport is 1440x1920 .
When I click on (1380, 1855). Objects at (1075,1410) is hit by the ray . When I click on (1075,1410), Objects at (905,1150) is hit by the ray .

By the way , the 3d object that is the child of the camera is not pinned to the camera ,the 3d object will offset the position when camera move .

And the control node can not be "Full Rect" For example: If the screen size is 100x100 and the viewport size is 50x50, the ui will only be displayed within the quarter of the screen which is at the upper left corner . can not press the ui button because the click of control node is offset too .

At last , I am not sure if this is a bug , but it took me a lot of time to make the camera move . I need to set ARVROrigin.world_scale to 100 to match the camera position with IOS device(The device moves 1 meter, the camera moves 100 units)