Does VisionOS have the equivalent of ARView.physicsOrigin?

I'm trying to scale the physics of a scene without changing the apparent size to avoid the low-speed zeroing-out of motion that the physics simulation does. I found a technique for using separate simulation and physics roots in the docs, but it relies on ARView, which VisionOS doesn't have. This seems more elegant than scaling absolutely everything with shared root -- any chance I'm just failing in my searches to find the equivalent functionality?

I have the same question, but for RealityRenderer: how to set a different physics origin entity than an ancestor, using RealityRenderer?

There is a general strategy to run rendering and physics at different scales: scale the parent entity before the physics step, then scale it back after the physics step. Example:

import RealityKit
import Combine

var subscriptions = Set<AnyCancellable>()

func setupPhysicsScaling(scene: RealityKit.Scene, physicsAncestor: Entity) {
    let willSimulate = scene.subscribe(to: PhysicsSimulationEvents.WillSimulate.self) { event in
        physicsAncestor.setScale([10, 10, 10], relativeTo: nil)
        /// do work to prepare for simulation
    }
    willSimulate.store(in: &subscriptions)
    
    let didSimulate = scene.subscribe(to: PhysicsSimulationEvents.DidSimulate.self) { event in
        physicsAncestor.setScale([1, 1, 1], relativeTo: nil)
        /// do work to prepare for rendering
    }
    didSimulate.store(in: &subscriptions)
}

With the setup above, entities that are children of the physics ancestor entity will physically behave as if they were 10 times bigger, but their rendering will remain at nominal scale.

This strategy works but needs careful setup. The key is to reason in terms of per frame update. Before a physics tick, prepare for simulation and maintain coherence. After the physics tick, set the rendering goal.

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)
Does VisionOS have the equivalent of ARView.physicsOrigin?
 
 
Q