A view for displaying AR experiences that augment the camera view with 3D SceneKit content.
Questions tagged [arscnview]
83 questions
0
votes
2 answers
SceneKit - Ignore touches on an SCNNode in the foreground and transfer touch to a background node
I am trying to make an app where users can measure distances on an ARSCNView. I have a scenario where there are 2 SCNNodes on top of each other. Node1 is always at the front because of its depth information. Node2 however is useful for measuring and…

Chandana
- 23
- 6
0
votes
0 answers
Adding CIFilters to selfie camera feed from ARSCNView
I'm setting up my ARScene using this code which works perfectly. I'm then trying to apply a CIFilter to the selfie camera feed and set it back in real time. The only way I can access the camera feed data is through the -session didUpdateFrame method…

IamRob
- 35
- 6
0
votes
1 answer
ARSCNViewDelegate methods not firing
I have a class that contains an ARSCNView:
class ARSessionCameraView: NSObject {
var delegate: ARViewWrapperDelegate?
var arKitView: ARSCNView = ARSCNView()
// Sets the frame of the ARKit view
func setupViews(arFrame: CGRect) {
…

narner
- 2,908
- 3
- 26
- 63
0
votes
0 answers
Adroid apk has assigned values to %d. Changing it to 20%d only outputs 20 before the assigned value. how can I add 20 to %d so output is sum of the 2
For example
Coins %d
Jus to change the number to be displayed in app such %d + 20 = 30 when %d is 10. And not 20%d which just gives out 2010 when %d is 10

Raphael
- 1
- 1
0
votes
2 answers
Is it possible to change the ARKit scene's object when clicking on a button Swift
I am building and ARkit project for the first time, and what I need to do is to, first of all, I have to display a 3D Sphere in the ARSCNView. and then when I click on a button, the sphere should disappear and display a 3D cube at its place.
I was…

Elin
- 105
- 1
- 7
0
votes
1 answer
Custom SKScene is not displaying in AR
I have created SKScene via SpriteKit tested it like 2D app. Here is my viewController. Everything works fine.
class GameViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
let scene =…

hexwhyzet
- 13
- 2
0
votes
1 answer
Capturing ARSCNView with virtual objects - iOS
I have an ARSCNView with virtual objects drawn. The virtual objects are drawn on the user's face.
The session has the following configuration:
let configuration = ARFaceTrackingConfiguration()
configuration.worldAlignment =…

DesperateLearner
- 1,115
- 3
- 19
- 45
0
votes
1 answer
SCNNode position in different places when image recognized Swift
I have this code in the didAddNode after an image is recognized.
The images are displaying on top of each other in an X pattern. I need them to be one next to the other. I have tried the SCNNode x, y, and z but the image is not moving within the…

Juli
- 1
0
votes
0 answers
Changing ARSCNView background
iOS 13.1.3 on iPad Pro
Seem like there is a a same problem on previous iOS versions.
Using AVCaptureDevice as SCNScene background content
My app uses front cam to create AR face in iOS. At first tour, my app uses default SCNView with camera input.…

Ozgur Sahin
- 1,305
- 16
- 24
0
votes
1 answer
ARSCNView Corner Radius not showing
I have a corner radius on my ARSCNView as below;
override func viewDidLayoutSubviews() {
sceneView.layer.cornerRadius = 8
sceneView.layer.masksToBounds = true
sceneView.clipsToBounds = true
}
However, it is only showing…

David Henry
- 1,972
- 20
- 43
0
votes
1 answer
Camera freezes when I come back to viewcontroller containing ARSCNView. How to come and go in this view controller without ARSCNView stop working?
How I initialize the ARSCNView
var sceneView: ARSCNView?
override func viewDidLoad() {
super.viewDidLoad()
if ARConfiguration.isSupported{
sceneView = ARSCNView(frame: CGRect(x: 0, y: 0, width: UIScreen.main.bounds.size.width,…

Bruna machado costa
- 15
- 5
0
votes
1 answer
Using an ARSCNPlaneGeometry to obtain a SCNPhysicsShape produces a sphere shape and not a plane
In an application using ARKit, I am using the ARSCNPlaneGeometry class update method to obtain a SCNGeometry from an ARPlaneGeometry. I obtain a SCNPhysicsShape from that geometry to use as the SCNPhysicsBody for a plane node:
func renderer(_…

caminante errante
- 185
- 1
- 11
0
votes
1 answer
ARKit SceneKit ARSCNView with Positional Audio SCNAudioPlayer WILL NOT STOP playing
Running ARKit 2.0 with an ARSCNView. iOS12
The application uses multithreading, that's why these functions are being performed on the main thread (just to be sure). I also tried without explicitly performing the functions on the main thread too,…

Geoff H
- 3,107
- 1
- 28
- 53
0
votes
1 answer
Color of pixel in ARSCNView
I am trying to get the color of a pixel at a CGPoint determined by the location of a touch. I have tried the following code but the color value is incorrect.
override func touchesBegan(_ touches: Set, with event: UIEvent?) {
if let…

Tyler Kelly
- 564
- 5
- 23
0
votes
1 answer
ARSCNView not displaying object when embedded in navigation controller
I am trying to display a 3D model when a picture is tapped (See here). The picture gets tapped, it segues to 3DFloorPlanViewController (which is embedded in a navigation controller), the camera works but there is no 3D object displayed (See…

Amy Fang
- 11
- 5