Questions tagged [arscnview]

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

76 questions
15
votes
6 answers

ARKit Place a SCNNode facing the camera

I'm using ARKit to display 3D objects. I managed to place the nodes in the real world in front of the user (aka the camera). But I don't manage to make them to face the camera when I drop them. let tap_point=CGPoint(x: x, y: y) let…
Marie Dm
  • 2,447
  • 2
  • 18
  • 35
13
votes
1 answer

How to prevent ARSCNView from rotating during orientation change

I am using ARKit and I want to allow the users to use the app in both portrait and landscape mode. I would like all UI controls to rotate on orientation change except for the ARSCNView. I tried to transform the sceneView in the opposite direction…
Praveen Gowda I V
  • 8,920
  • 4
  • 39
  • 49
9
votes
2 answers

Swift ARKit How do you fully kill an ARSession?

I have an ARSCNView running an ARSession. You can pause the session with session.pause() sure, but that still in effect, leaves the session running. I have tried deallocating the ARSCNView by removing it from its superview. The ARSCNView indeed…
Geoff H
  • 2,688
  • 1
  • 25
  • 45
7
votes
2 answers

'hitTest()' was Depecrated in iOS 14.0

I'm new to this and currently building an AR-related application, on the old version I stated this let results = self.hitTest(screenPosition, types: [.featurePoint]) and now I have a problem where the hitTest is deprecated in iOS…
Zaky Putra
  • 71
  • 3
7
votes
1 answer

ARKit: Finding the coordinates of a SCNNode on the screen

I have a simple Swift ARKit setup where I have a SCNNode with a 3D object that is visible in an ARSCNView. I want to determine the 2D coordinates of this object on the ARSCNView. By this I mean the x- and y-coordinates the object has when it is…
AscendingEagle
  • 607
  • 6
  • 12
6
votes
1 answer

Extract face features from ARSCNFaceGeometry

I've been trying without success to extract face features, for instance the mouth, from ARSCNFaceGeometry in order to change their color or add a different material. I understand I need to create an SCNGeometry for which I have the SCNGeometrySource…
pesch
  • 1,866
  • 2
  • 14
  • 26
6
votes
3 answers

Is there front facing camera support with ARKit?

How can we access Front Facing Camera Images with ARCamera or ARSCNView and is it possible to record ARSCNView just like Camera Recording?
Bharrath
  • 79
  • 1
  • 4
5
votes
1 answer

ARSCNView before iOS 11.0

I'm trying to add ARKit to one of my existing apps, and I'm making that transition to the view when you click a button. I made the button only available if you have iOS 11 so you'll only be able to go to that view with iOS 11, but how do I get rid…
Amit Kalra
  • 3,907
  • 6
  • 25
  • 43
4
votes
1 answer

iOS ARKit - Calculate the degree of rotation of device in all three direction

I want to get the degree of Rotation of all three axis. I am trying to achieve with landscape mode. When rotate device from left to right (Y-rotation), I want the degree covered once user set a left end and rotatae to right. So we need the degree…
jpulikkottil
  • 564
  • 5
  • 20
4
votes
0 answers

iOS ARKit app: How do I rotate the UI (screen) without rotating the camera view inside?

I'm trying to make an iOS app featuring some AR experience using ARKit. The app now has a start-up view with a "start" button (which shows first after the app is just launched) and a AR View (which shows after I tap the "start" button in the…
Lemon
  • 41
  • 2
3
votes
1 answer

ARKit 2 : Place 3D objects using ARKit causes screen to freeze in Xcode 10.1 and iOS 12

I am placing virtual objects in real environments using ARKit. It is worked fine in Xcode 9 and iOS 11. But when i have updated Xcode and iOS, if I place virtual objects in detected plane it is getting freeze and if I rotate camera, camera also…
Raj
  • 475
  • 8
  • 18
3
votes
1 answer

Check if ARSession is running (ARKit)

I have an ARSCNView that can occasionally pause its session depending on the situation. Is there a way to check if its session is running? Something like this: class myARView: ARSCNView { ... func foo() { if(session.running) { …
MuhsinFatih
  • 1,505
  • 18
  • 27
3
votes
1 answer

Placing an object in front of camera at Touch Location

The following code places the node in front of the camera but always at the center 10cm away from the camera position. I want to place the node 10cm away in z-direction but at the x and y co-ordinates of where I touch the screen. So touching on…
Zeus Eternal
  • 407
  • 1
  • 4
  • 10
3
votes
0 answers

VNTrackObjectRequest not tracking face using VNFaceObservation in ARSCNView

I am trying to track face using VNFaceObservation in ARSCNView let response = observations.map({ (face) -> (observation: VNFaceObservation, image: CIImage, frame: ARFrame) in self.lastObservation =…
Ros
  • 116
  • 8
3
votes
1 answer

When I use ARKit's ARSCNView, can I use the iPhone's front camera?

Currently I am learning about ARKit. On the Internet, there are usually sample code that uses ARSCNView and iPhone's back camera. I would like to use ARKit with a front camera instead of an iPhone's back camera. When I use ARKit, can I use ARSCNView…
ginger
  • 69
  • 9
1
2 3 4 5 6