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
2
votes
0 answers

SCNNode and Firebase

I have 15 box and I add an image on each boxnode as first material. How can I load the images from Firebase and add an Image to each node. I already know how to load images from Firebase, I want to know the best way I can add an image on each 15…
John
  • 799
  • 6
  • 22
2
votes
1 answer

Drag SceneKit Node Along X-Axis while maintaining velocity? Swift 3

Swift 3, SceneKit: In my game, I have an SCNSphere node in the center of the screen. The sphere drops by gravity onto an SCNBox node, and a velocity of SCNVector3(0,6,0) is applied to it once it collides with the box. A new box is created and moves…
Tiptech
  • 177
  • 1
  • 17
2
votes
1 answer

Improve SceneKit Playground Speed

I am testing some simple SceneKit runtime node creation of planes (only about 30 planes) and would prefer to use a Playground to test concepts. Normally Playgrounds run reasonably fast but with SceneKit the drawing that normally takes a fraction of…
Greg Robertson
  • 2,317
  • 1
  • 16
  • 30
2
votes
1 answer

SceneKit: increase sharpness of texture used for SCNNode material?

Our app lets users upload custom images to serve as materials for SCNNodes, as you can see from the screenshots and code below. Screenshot 1 shows SCNNodes when the materials use a scale of 1. Screenshot 2 shows the same nodes with a scale of…
Crashalot
  • 33,605
  • 61
  • 269
  • 439
2
votes
1 answer

SceneKit: unprojectPoint returns same/similar point no matter where you touch screen

The code below should translate touch coordinates into world coordinates for a SceneKit scene. However, as illustrated by the output below, the point returned by unprojectPoint returns effectively the same point no matter where you touch on the…
Crashalot
  • 33,605
  • 61
  • 269
  • 439
2
votes
1 answer

SceneKit nodesInsideFrustumWithPointOfView: unexpectedly returning empty

I am using the following method to determine which SCNNodes are visible by the camera. [self.scnView nodesInsideFrustumWithPointOfView:cameraNode]; However the returned array is always empty. I set up the scene up as…
SMD01
  • 101
  • 1
  • 13
2
votes
1 answer

SceneKit: Make child sphere visible inside semi-transparent parent sphere?

In SceneKit, say you want to embed a node, Child, inside a semi-transparent node, Parent, such that Parent acts like a "cage" you can see through and view Child. Concretely, say Parent is a SCNSphere with radius 2. Child is a SCNSphere with radius 1…
Crashalot
  • 33,605
  • 61
  • 269
  • 439
2
votes
1 answer

What is the equivalent of colorizing an object in SceneKit?

How can I animate a change in color of an SCNNode? In SpriteKit I would just use the colorizeWithColor SKAction, but that is not an option in SceneKit. In SpriteKit, I would typically have a collision between two nodes. When the nodes collided one…
Tiptech
  • 177
  • 1
  • 17
2
votes
2 answers

How do I make my camera node focus on a tapped node? (SceneKit)

I created an empty node and added a set of nodes to the empty node and finally adding that to my root node. After which, I create a camera node as shown below. I am trying to add a feature to my scenekit app where by when a user tap a node, the…
user4432964
2
votes
1 answer

Preload Scenekit Scene

There seems to be a delay for when my SCNView is ready, and when it actually renders on my view - I always see a split second of white before the view appears. What can I do to prevent this? func loadModels(frame:CGRect, type:ItemViewType,…
Codermonk
  • 883
  • 16
  • 32
2
votes
1 answer

Changing the value of string on SCNText produces no change

I am reading the gyro and changing the string of a SCNText geometry to the gyro's yaw value. The change occurs inside the gyro handler that is called every 1/30 seconds. The SCNText geometry was created with Interface Builder. I am using this code…
Duck
  • 34,902
  • 47
  • 248
  • 470
2
votes
1 answer

How to use allowsCameraControl with a camera node in SceneKit

I have a camera node which has been set a projection transform matrix(Not identity) and can see some 3D models with property model view matrix.When I set allowsCameraControl to YES,I can't see any objects if do any gesture. Firstly,is there any…
lusnaow
  • 51
  • 5
2
votes
0 answers

SCNNode: fixing orientation from lookAt constraint

Is it possible to fix a nodes orientation such that it no longer requires a lookAt constraint? I.e., "bake" the orientation of the node. I'm making "bonds" (cylinders) between "atoms" (spheres). I place the cylinder node in a container node so as to…
bpedit
  • 1,176
  • 8
  • 22
2
votes
2 answers

SceneKit: orient one node toward another in 3Dspace

I need to orient one node to point its Z-axis at another node in 3D. Yeah, the perfect job for the LookAtConstraint. And for most of my work LookAt is fine. But when I apply LookAt to a particular node, I can no longer animate that node's…
bpedit
  • 1,176
  • 8
  • 22
2
votes
0 answers

SceneKit rayTestWithSegmentFromPoint, hitResults always nil

Ok this one has had me scratching my head for the past couple of hours. I'm attempting to do raytesting on an SCNScenePhysicsWorld (hitTest in SCNRenderer works without a glitch though) Steps i take: 1.- properties: let scene = SCNScene() var…
David Homes
  • 2,725
  • 8
  • 33
  • 53