-
-
Save sturdysturge/0458f854382d3f8c91db415c3195b271 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
import RealityKit | |
struct ContentView : View { | |
@State var moving = false | |
@State var rotation = Float() | |
@State var speed = Float() | |
let boxAnchor = try! Experience.loadBox() | |
var body: some View { | |
ZStack { | |
AnyViewRepresentable { | |
let arView = ARView(frame: .zero) | |
arView.scene.anchors.append(boxAnchor) | |
return arView | |
} | |
DriveView(moving: $moving, rotation: $rotation, speed: $speed, | |
rotationChanged: rotationChanged, onTimer: onTimer) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment