This didn't seem to help with the aggressive damping that the physics simulation does, so I'm not sure it's really scaling? Or maybe I'm just not calling the function with the right arguments.
Here's my ImmersiveView definition up to the point where I call your setupPhysicsScaling function.
struct ImmersiveView: View {
@Environment(AppModel.self) var appModel
@Environment(\.realityKitScene) var realityKitScene
@State private var subscriptions = Set<AnyCancellable>()
var body: some View {
RealityView { content in
let anchor = namedEntity("Root Anchor") { AnchorEntity() }
content.add(anchor)
let physicsSimulation = PhysicsSimulationComponent()
var sceneRoot = Entity()
sceneRoot.components.set(physicsSimulation)
sceneRoot.setParent(anchor)
setupPhysicsScaling(scene: realityKitScene!, physicsAncestor: sceneRoot)
Topic:
Graphics & Games
SubTopic:
RealityKit
Tags: