You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

ARKit技术问题:如何隐藏/删除world origin anchor?已发布应用仍显示该锚点

ARKit World Origin Anchor Troubleshooting

Hey there! Let's work through your ARKit world origin anchor issues step by step:

1. How to hide the X/Y/Z world origin anchor

The world origin visualization you're seeing is almost always tied to ARKit's debug mode settings. Here's how to turn it off based on your AR framework:

For SceneKit-based apps (ARSCNView)

If you’ve enabled debug options that include .showWorldOrigin, simply remove that flag from your scene view’s configuration:

// Hide only the world origin while keeping other debug features (like feature points)
sceneView.debugOptions.remove(.showWorldOrigin)

// Or disable all debug visualizations entirely
sceneView.debugOptions = []

For RealityKit-based apps (ARView + SwiftUI)

Adjust the debug options on your ARView instance to remove the world origin overlay:

arView.debugOptions.remove(.showWorldOrigin)

If you added a custom node to represent the world origin (not the built-in debug one), you can directly hide or remove it:

// Hide the node without removing it from the scene
customWorldOriginNode.isHidden = true

// Or remove it entirely
customWorldOriginNode.removeFromParentNode()

2. Why the world origin anchor still shows after trying to delete it

First, a key detail: ARKit’s default ARWorldOriginAnchor is a system-managed anchor that you cannot delete—it’s the foundational reference point for all AR content in your session. If it’s still visible in your released app, here’s the most likely fix:

  • You forgot to disable debug mode in your release build: The built-in world origin visualization is part of ARKit’s debug tools. Even if you try to "delete" the anchor, this overlay stays visible as long as .showWorldOrigin is enabled. Use conditional compilation to only enable debug options in development:
#if DEBUG
sceneView.debugOptions = [.showWorldOrigin, .showFeaturePoints]
#else
sceneView.debugOptions = []
#endif
  • You missed removing the associated node for a custom anchor: If you created your own anchor and added a node to represent it, deleting the anchor alone isn’t enough—you need to also remove the corresponding node from the scene (as shown in the first section).

Double-check your code for leftover debug flags, and ensure you’re not accidentally enabling debug visualizations in release builds. That’s the #1 culprit here!


内容的提问来源于stack exchange,提问作者pd jung

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.22 09:55:25