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

SCNNode init with map_Bump

I initialize the SCNNode let asset = MDLAsset(URL: url!) let object = asset.objectAtIndex(0) let node = SCNNode(MDLObject: object) Properties of mtl such as "map_Kd", "map_Ka", "map_Ks" reads well, but the property "map_Bump" or "Bump" are not read…
0
votes
2 answers

Accessing SCNSphere Properties

I am trying to access / modify the properties of an SCNSphere that I have in a SCNScene. I have the scene pre-set as a file called "spaceScene.scn". I am loading the scene as such self.sceneView.scene = [SCNScene…
Will Von Ullrich
  • 2,129
  • 2
  • 15
  • 42
0
votes
1 answer

Get frame of SceneKit node in app window?

I'm hoping to overlay a UIView (specifically a highlight box with some text, etc) over an object rendered in SceneKit, but I'm encountering an issue: I don't know exactly where the object will be onscreen at the time. Is there a way to get the…
Nerrolken
  • 1,975
  • 3
  • 24
  • 53
0
votes
1 answer

How do I apply an equal force on each collision regardless of velocity? - Swift, Scenekit

I need to get my sphere to bounce the same distance and at the same velocity each time it collides with a box. As of right now, the ball will collide with the first box and a force is applied to make it reach the next box. Over time, the ball…
Tiptech
  • 177
  • 1
  • 17
0
votes
1 answer

Do I need a random geometry, material, or something else? - SceneKit, Swift

In my game, I add a new a tempLeftBox (an SCNNode with an SCNBox geometry, and an SCNMaterial) every 5 seconds or so along a straight path. The tempLeftBox has its own geometry and its own material. For each tempLeftBox that is added, the color of…
Tiptech
  • 177
  • 1
  • 17
0
votes
1 answer

Scenekit: Objects become invisible after several objects are added (Objective-C)

I am building a game with SceneKit. It is based on SCNBoxes which get added and removed. At the end there are like 30 boxes added to the root node. // Prepare Surface Layer for Blocks self.colorOfBlock = [CALayer layer]; …
Alexander Langer
  • 320
  • 2
  • 11
0
votes
1 answer

SCNAction.rotate clips through other nodes

I have a node (nodeCollection) that has an SCNNode as a childNode which is created like this: let boxGeo = SCNBox(width: 1, height: 1, length: 1, chamferRadius: 0.0) let node = SCNNode(geometry: boxGeo) node.physicsBody =…
user3916570
  • 780
  • 1
  • 9
  • 23
0
votes
1 answer

SCNScene / SCNSphere's visible area

I have a SCNScene that contains a SCNSphere encapsulating the SCNCamera (camera is inside @ center of the SCNSphere, displaying its inner wall on screen). Is there a method to query or a way to infer / calc the VISIBLE area of this sphere? I dont…
David Homes
  • 2,725
  • 8
  • 33
  • 53
0
votes
1 answer

How to create a User Generated Animation in SceneKit with .dae (COLLADA) file from Blender

I’m trying to animate specific parts of a SCNScene object in SceneKit (in my case I want to animate fingers of a hand). I import the .dae (COLLADA) file easily from Blender with the respective bones to generate articulation on the model. override…
Joao
  • 1
  • 4
0
votes
1 answer

SceneKit: vertically center scaled SCNNode inside parent?

The goal is to scale a SCNNode and vertically center it within its parent. However, scaling a SCNNode does not affect its bounding box and computing the scaled height does not work. Without an accurate height, how can you vertically center the node…
Crashalot
  • 33,605
  • 61
  • 269
  • 439
0
votes
1 answer

SCNNode releasing children with altered transform and pivot properties

I'm dealing with children nodes with pivot and position that have been altered. I found a lot of SCNNode transformation topics, but it seems none of them represent my situation. I have six balls : (can't post more than 2 links, image is at…
0
votes
0 answers

How to make SCNNode Position same for Child and Parent Nodes?

I have a scene with a child node named wc. I want to add dae/model file on that node. I was able to add the model/dae via following: Create parent scene with dae asset from bundle Add parent scene to the scnView and typecast it to self.view Get the…
madLokesh
  • 1,860
  • 23
  • 49
0
votes
2 answers

Can I copy a SCNNode and keep the scale

I would like to copy a SCNNode multiple times, have different materials for each node and different positions. However keeping the same scale. So, if I change the scale for the node I copy, all copied nodes should change. In the code below, when I…
singularity
  • 99
  • 2
  • 9
0
votes
1 answer

rotating a coordinate cross in SCNScene to mirror camera movements

I am new to SceneKit and I could use your help with the following: I have two SCNViews - a large one (skView) showing the scene for the user which can be manipulated by the user with the standard allowsCameraControl option enabled - another small…
user1612877
  • 391
  • 1
  • 5
  • 19
0
votes
2 answers

SceneKit: native way to find node at certain position in SCNView? If not, use a dictionary to map positions to nodes?

Is there a native way with SceneKit to find a node at a given position, e.g., (0,0,0), within a SCNView? Assume a SCNView contains a SCNNode which acts as a layer for other SCNNodes. Is there a native way to find all the nodes at a specific position…
Crashalot
  • 33,605
  • 61
  • 269
  • 439