{"id":13506299,"url":"https://github.com/simonbs/ImmersiveMoveAndRotate","last_synced_at":"2025-03-30T03:30:47.463Z","repository":{"id":186816483,"uuid":"675818280","full_name":"simonbs/ImmersiveMoveAndRotate","owner":"simonbs","description":"Example project showing how an immersive scene on visionOS can contain a RealityView that presents a ModelEntity and how that entity can be dragged using DragGesture and rotated using RotateGesture3D.","archived":false,"fork":false,"pushed_at":"2024-01-24T09:59:36.000Z","size":376,"stargazers_count":72,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-14T01:04:44.252Z","etag":null,"topics":["ios","swift","visionos"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simonbs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"simonbs"}},"created_at":"2023-08-07T19:52:24.000Z","updated_at":"2025-03-08T02:20:59.000Z","dependencies_parsed_at":"2024-01-21T14:19:07.448Z","dependency_job_id":"e91664d7-a9da-4ccf-b7f4-575595d9bf38","html_url":"https://github.com/simonbs/ImmersiveMoveAndRotate","commit_stats":null,"previous_names":["simonbs/immersivemoveandrotate"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonbs%2FImmersiveMoveAndRotate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonbs%2FImmersiveMoveAndRotate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonbs%2FImmersiveMoveAndRotate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonbs%2FImmersiveMoveAndRotate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonbs","download_url":"https://codeload.github.com/simonbs/ImmersiveMoveAndRotate/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246273533,"owners_count":20750904,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ios","swift","visionos"],"created_at":"2024-08-01T01:00:43.307Z","updated_at":"2025-03-30T03:30:42.450Z","avatar_url":"https://github.com/simonbs.png","language":"Swift","funding_links":["https://github.com/sponsors/simonbs"],"categories":["Projects"],"sub_categories":["Community"],"readme":"# ImmersiveMoveAndRotate\n\nExample project showing how an immersive scene on visionOS can contain a [RealityView](https://developer.apple.com/documentation/realitykit/realityview/) that presents a [ModelEntity](https://developer.apple.com/documentation/realitykit/modelentity) and how that entity can be dragged using [DragGesture](https://developer.apple.com/documentation/swiftui/draggesture) and rotated using [RotateGesture3D](https://developer.apple.com/documentation/swiftui/rotategesture3d).\n\nThis example project deliberately only allows moving the object along the X- and Z-axis to prevent the user from lifting the object from the ground. However, it is straightforward to allow movement along the Y-axis by modifying the code in [EntityMovementViewModifier.swift](https://github.com/simonbs/ImmersiveMoveAndRotate/blob/main/ImmersiveMoveAndRotate/EntityMovementViewModifier.swift).\n\n**Note:** Performing 3D gestures in the simulator is difficult because the simulated gestures are actually performed on a 2D surface. Based on my testing, it appears that the axis around which the gesture rotates depends on the side of the object we are touching and/or the side of the object we are looking at. I expect this to work better on a device.\n\n![](https://github.com/simonbs/ImmersiveMoveAndRotate/blob/main/video.gif?raw=true)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonbs%2FImmersiveMoveAndRotate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonbs%2FImmersiveMoveAndRotate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonbs%2FImmersiveMoveAndRotate/lists"}