Questions tagged [arscnview]

A view for displaying AR experiences that augment the camera view with 3D SceneKit content.

76 questions
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 Lintin
  • 1,315
  • 12
  • 32
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,…
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(_…
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
  • 2,688
  • 1
  • 25
  • 45
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
  • 542
  • 4
  • 22
0
votes
1 answer

ARKit hitTest(_:options:) to select placed 3d-objects not working

I am trying to select an object which has been placed on a detected plane in order to perform various task on it such as rotating through gestures. In order to search for placed objects and avoid getting hitTestResults of irrelevant nature (eg.…
A. Claesson
  • 429
  • 2
  • 14
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
  • 1
  • 4
0
votes
1 answer

How to set preferredRenderingAPI for ARSCNView in Xcode IB

In my ARKit application ARSCNView is initialized and attached to ViewController internally based on storyboard file structure. So in function viewDidLoad I have already initialized view. But the problem is it uses default rendering API metal. But I…
0
votes
1 answer

ScreenShot issue in ARKit in swift

i have application that uses ARSCNView. i'm trying to take a screenshot on click of a button and saved that image in the gallery. But when i take a screenshot it does not show the content on that screen. Just show that image, i have some labels on…
raheem
  • 659
  • 2
  • 8
  • 16
0
votes
1 answer

Getting the world x, y, and z of placed SCNNode - Swift

My objective is to generate a SCNNode in the middle of another SCNNode that contains a SCNPlane. The SCNPlane is generated in a renderer function like this: func renderer(_ renderer: SCNSceneRenderer, didAdd node: SCNNode, for anchor: ARAnchor) { …
user287474
  • 315
  • 5
  • 17
0
votes
1 answer

Scaling 3D objects to same size and placing them at exactly 1m away from iphone/ipad camera using Arkit

I need to scale a set of 3D objects to same size and place them at a distance of 1m from the iPad. I am having an transparent image on the screen just above the ARSCNView and I am trying to overlap the 3d object exactly in behind the transparent…
ManjunathK
  • 143
  • 1
  • 11
0
votes
0 answers

ARSCNView.delegate is nil even i set to self

I have a sceneview in my controller and i set its delegate to self but its delegate methods are not getting called. While debugging, i set delegate to self but its not working. Please help. Here is my code override func viewDidLoad() { …
Ghulam Rasool
  • 3,421
  • 2
  • 21
  • 36
0
votes
1 answer

How to Zoom .DAE 3D model using ARKit iOS

I have a 3D model with .scn extension. How to zoom it with pinch gesture without virtualobject file from iOS sample Placing Objects application. Pinch gesture works well with .scn's if its converted from .obj file. But its not working with .dae…
0
votes
2 answers

Use an ARSCNView on devices that don't support ARKit

Is it possible to use an ARSCNView, configure it with an ARWorldTrackingConfiguration for device that support it, and configure it another way for devices that don't support it (with A8 chip and lower) and still have the video render in the…
Marie Dm
  • 2,447
  • 2
  • 18
  • 35
0
votes
1 answer

ARSCNView's root node's "heading" doesn't match the device heading

I want a node which I add to my scene to point north. I get the heading data from Core Location, so that represents the direction the device is currently facing at the point my scene was created (and thus the direction my root node faces), and then…
Andrew
  • 6,993
  • 10
  • 39
  • 72