A simple tool for showing local and pivot coordinate system of SCNNode.
Initially created during experiments with ARKit + SceneKit.
| Coordinate System | X | Y | Z |
|---|---|---|---|
| Local | |||
| Pivot |
To install it through CocoaPods, add the following line to your Podfile:
pod 'SCNNodeVisualDebugger', :git => '[email protected]:handsomecode/SCNNodeVisualDebugger.git'
Please, don't forget to run pod update command to update your local specs repository during migration from one version to another.
To install it through Carthage, add the following line to your Cartfile:
github "handsomecode/SCNodeVisualDebugger"
import SCNNodeVisualDebuggerlet node: SCNNode = // provide SCNNode instance
node.addDebugAxes()If you need to add debug axes to child nodes as well you should pass a flag recursively as true as a parameter of the method. By default, recursively value is false
node.addDebugAxes(recursively = true)node.removeDebugAxes()If you need to remove debug axes from child nodes as well you should pass a flag recursively as true as a parameter of the method. By default, recursively value is false
node.removeDebugAxes(recursively = true)if node.hasDebugAxes() {
// some actions
}It can be useful to show or remove debug axes at runtime. For this purpose, you can use a double tap on a specific node.
Set enableDebugAxesByDoubleTap property of SCNView instance to true to enable double tap trigger.
sceneView.enableDebugAxesByDoubleTap = trueUse SceneKitSample and ARKitSample to see implementation details.
- If you need help or found a bug, please, open an issue.
- If you have a feature request, open an issue.
- If you are ready to contribute, submit a pull request to develop branch.
- If you like SCNNodeVisualDebugger, please, give it a star.
You can find more details into CONTRIBUTING file.
- iOS 9.0+
- Xcode 8.3+
- Swift 3.1+
SCNNodeVisualDebugger is available under the Apache License, Version 2.0. See the LICENSE file for more info.
