Developed a series of squares in Reality Composer Pro and used Xcode to implement tap gestures, hover effects, and interactive 3D buttons.
An August 18 weekend - Sharm
⚠️Optimization led me to consolidate everything into a single object. [jump to Optimization?]
However, an error occurred because the targetedToEntity
method expects a single Entity
, but I was passing an array of ButtonEntity
objects (buttons
).
Fix’d 😊
Building a stage with buttons in Xcode and RCP. Setting up the overall xcode project and begin the setup of 3D buttons inside Reality Composer Pro.
Create a new Mixed immersive scene
Starter file Content View
VStack {
Model3D(named: "Scene", bundle: realityKitContentBundle)
.padding(.bottom, 50)
Text("Hello, world!")
ToggleImmersiveSpaceButton()
}
We can use model3D to bring in the individual buttons, but we will try to fetch it using root entity since all the buttons will be inside the root of the model.