Questions tagged [scnnode]

SCNNode is a part of the SceneKit Framework. An SCNNode object represents a portion of a scene graph.

SCNNode is a part of the SceneKit Framework. An SCNNode object represents a portion of a scene graph. A node by itself has no visible content when the scene containing it is rendered—it represents only a position in space (and transformation of coordinate spaces) relative to its parent node. To construct a scene, you use a hierarchy of nodes to create its structure, then add lights, cameras, and geometry to nodes to create visible content.

401 questions
0
votes
0 answers

ARKit: add a virtual 2D image aside of a tracked image

I am trying to place a virtual 2D image on the screen aside of a tracked (reference) image. To do that I used the code below once the reference image is tracked, I create a plane which resembles the image on the screen and then I evaluate position…
Fabrizio Prosperi
  • 1,398
  • 4
  • 18
  • 32
0
votes
1 answer

How to not rotate Wrapped Text in SCNSphere when Scene/Camera is rotated by user

let dotGeometry = SCNSphere(radius: 0.0005) let dotNode = SCNNode(geometry: dotGeometry) dotNode.position = dotPosition if let image = imageWithText(text: "\(index)", fontSize:20, imageSize: CGSize(width:100,height:100), backgroundColor: .cyan) { …
Kashif
  • 4,642
  • 7
  • 44
  • 97
0
votes
1 answer

Swift, add Node to SCNNode and place in corner

I try to place a Node (image) inside a SCNNode. I want it to be in the upper-right corner. But how do I achive this? So: I want to place the buttonNode inside the urlNode: let urlNode = createWebView(url: url) urlNode.scale = SCNVector3(x: 0.3,…
P Star
  • 67
  • 2
  • 13
0
votes
1 answer

Placing a SCNNode on a plane and detecting that the node is tapped

I'm working on an app which first detect that there is a vertical plane, and after that, if the user touches the plane I add a SCNNode to the rootNode. After that, I want to detect if the user touches the node to do more things, but I'm not able to…
diegomen
  • 1,804
  • 1
  • 23
  • 37
0
votes
1 answer

how to 3d rotate arkit text (Swift4)

My code below takes text and places 3d text in argument reality. The problem is that I cannot rotate the text. I can just move it around in a 2d direction. I would like to be move and rotate the text. I dont know how to do this. I have not seen any…
user8105388
0
votes
0 answers

Avoid collision between two same SCNNodes

After reading up on the docs, I understand that to avoid collisions between two 3D objects, their & operation has to come out to be zero. I have the same 3D object which I'm adding into my scene multiple times and acting a dynamic force on them via…
apunn
  • 97
  • 8
0
votes
1 answer

Scenekit - Soften physicsBody

Is there a way I can "soften" a SCNNode with a physicsBody? Right now, my nodes react to collisions between them as if they are made out of metal. I want their collisions to be more like pillows. Setting the restitution ("bounciness") to 0 doesn't…
Andy Novak
  • 378
  • 5
  • 11
0
votes
0 answers

Local rotate SCNNode SceneKit within its middle point

I have to localRotate once a node within it's z axis and it's 3D center (middle point of the node) Then I should move the node to a new global camera position. The issue is when apply a movement to x axis the localTranslate should move the node…
Duna
  • 1,564
  • 1
  • 16
  • 36
0
votes
1 answer

how to add label node and user image in SCNNode with gesture action in ARKit?

Actually i am working business card image detection to show there business profile. I have already achieved image detection, plane animation. Here is my question, when image detected along with plane it should show user name label, profile and…
PvDev
  • 791
  • 21
  • 67
0
votes
1 answer

Changed positions of SCNNodes after unwinding

I have an ARKit view (1st view) in which I set nodes to certain positions. Then, I would like to allow the user to go to the 2nd view but also be able to return to the ARKit view by clicking on the return button. The button makes an unwind to the…
aleksy.t
  • 267
  • 2
  • 18
0
votes
1 answer

Two Dynamic SCNNodes Not Colliding (Scenekit)

I am currently in the process of making a Scenekit game in ARKit. I have two dynamic SCNNodes, and when they make contact with each other, they pass through one another. I have set up each node's physics body's collisionBitMask to include one…
tennis25
  • 99
  • 1
  • 2
  • 12
0
votes
0 answers

pointOfView node not appearing after removing and calling again

So I am developing an AR application. I have a button that initiates a exam/test mode where use has to answer questions correctly and gains one mark for each correct answer. When the test mode is initiated a pointOfView node from the…
mcma
  • 21
  • 5
0
votes
0 answers

SCNNode Collision Detection not recognized in ARSCNView

Im having trouble with detecting collisions in AR/SCNKit. Ive found this: How to set up SceneKit collision detection, although helpful, I still dont have my code working. The main goal is to detect when two scene nodes touch, one is a ball, the…
user287474
  • 325
  • 1
  • 5
  • 19
0
votes
1 answer

SceneKit get node position after rotation

For example I have two SCNNodes with SCNBox geometry positioned one after another increasing x position property: SCNBox(width: 0, height: 0, length: 0.02, chamferRadius: 0) Then I want to rotate the first one using rotation property with…
mkz
  • 2,302
  • 2
  • 30
  • 43
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
  • 325
  • 1
  • 5
  • 19