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
3
votes
1 answer

geometry of the node from dae file is nil

I've made 3d model with blender and I want to use it in scene kit. var platform = SCNNode(); let dae = SCNScene(named:"platform.dae"); platform = dae!.rootNode; platform.position = SCNVector3(x: 0,y: 0,z:0); if platform.geometry == nil { …
white5tone
  • 166
  • 8
3
votes
1 answer

SceneKit, 'hit' testing between camera orientation and geometry

I'm currently following David Roonqvist's 3D Graphics with SceneKit book. Chapter 5 deals with hit testing, no issues implementing it, but only deals with his testing from mouse events. Now, I know my camera's orientation will ALWAYS intersect a…
David Homes
  • 2,725
  • 8
  • 33
  • 53
3
votes
1 answer

SceneKit Physics – Friction and Concave Polyhedrons

I am working on a cornhole game in Scene Kit and have encountered a bug with SCNPhysicsShape and SCNPhysicsBody friction. The board for the game is loaded through a .dae file and is set as a SCNPhysicsShapeTypeConcavePolyhedron. This allows the bean…
user2252471
  • 289
  • 3
  • 9
3
votes
1 answer

How do I add a 2D view inside a 3D SCNNode in Scene Kit

I'm trying to add a type of "notification" above a 3D view that follows it and if the camera rotates or the SCNNode rotates that view always stay looking front, it's to "expensive" to do calculations and make a flat 3D and rotate it every time some…
c4b4d4
  • 964
  • 12
  • 32
2
votes
0 answers

Align SCNText Along SCNCylinder

I am just starting out with ARKit and trying to make a very simple app where the user selects 2 points shown as SCNSphere, a "line" (SCNCylinder) connects the 2 spheres and some text SCNText will appear to show the distance between the 2 points. The…
ez4nick
  • 9,756
  • 12
  • 37
  • 69
2
votes
0 answers

arkit showPhysicsShapes larger than node

I am using arkit and trying to have two node collide but the collisions appears to happen too early. When I do ballsSceneView.debugOptions = .showPhysicsShapes I see that the physic shape is larger than the actual node. Attached a photo How can I…
Ros
  • 144
  • 8
2
votes
1 answer

How to limit SCNNode from moving when camera moves along the x-axis?

I'm working a simple app using ARKit where a user can tap their screen and place a node (SCNNode) on a given location. I want the user to be able to place nodes that stay in place no matter where the camera is so that when they pan back to the…
Toni Li
  • 21
  • 2
2
votes
2 answers

Issue with adding shadow to a SCNPlane with clear background

I am trying to add a shadow on SCNPlane, everything works fine but I cannot make SCNPlane transparent to show only the shadow not with the white background. here is the code: let flourPlane = SCNPlane() let groundPlane = SCNNode() …
iOS.Lover
  • 5,923
  • 21
  • 90
  • 162
2
votes
1 answer

SCNNode not showing in ARFrame's capturedImage

I added a SCNNode to a ARSCNView: func renderer(_ renderer: SCNSceneRenderer, nodeFor anchor: ARAnchor) -> SCNNode? { guard let faceAnchor = anchor as? ARFaceAnchor else { return nil } guard let device = sceneView.device else { return nil } …
Bobby
  • 6,115
  • 4
  • 35
  • 36
2
votes
1 answer

Why does SCNNode .flattenedClone() either crash or make performance worse?

I'm attempting to add around 4.5k SCNNode objects to a scene. Their geometries are one of two SCNPlanes, whose materials are rendered by CALayers (but I don't think that matters, the CALayerDelegates are only called once each, so that doesn't seem…
Robert Atkins
  • 23,528
  • 15
  • 68
  • 97
2
votes
1 answer

Move camera to tapped SCNNode

I'm using SceneKit and Swift to try and move the camera so it's 'focused' on the selected node. I understand I have the defaultCameraController enabled but I was trying to adjust the camera's position via dolly, rotate and translateInCameraSpaceBy…
Hews
  • 569
  • 6
  • 19
2
votes
1 answer

Is there anyway to identify the touched node in ARKit?

I am using ARKit to project a 3D file. In that 3D there are multiple sub nodes. When a user touches on any node we have to display some information about the touched node. Is there any way we could identify on which node the user touched?
2
votes
0 answers

How calculate transform and position of SCNNode from .scn for area of ARSCNView

I dont undestand how I can calculate SCNNode position on my ARSCNView with using Vision object. I have a detected face (VNFaceObservation) in ARSCNView, load node from .scn file. And I want that node was moving with face position. I calculate 2D…
Stas Telnov
  • 305
  • 2
  • 13
2
votes
1 answer

SCNText not showing in SceneKit

I'm trying to add a simple text overlay in my 3D scene and nothing is showing up. For reference a SCNBox adds and displays just fine. Help? SCNNode PlaceText(SCNVector3 pos) { var text = SCNText.Create("hello world", 5); text.Font =…
Wes W.
  • 93
  • 5
2
votes
1 answer

Scale a particle system in SceneKit

I'm doing a game with SceneKit for which the size of the whole game can change, i.e. the size of the reference node (GameRootNode) to which all nodes are linked can change, then all nodes size change accordingly when it happens. When it comes to…
Jonah Begood
  • 317
  • 2
  • 14