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

Adding SCNNode multiple time shows only once

I am trying to add SCNNode mutiple time in a loop at different position but I can see same type of node at once with the last position. Below is the code let entityArray:[entity] = [.coin, .coin, .coin, .brick, .coin, .coin, .coin, .brick] func…
Jasmeet Kaur
  • 1,538
  • 14
  • 16
0
votes
1 answer

SCNText won't show

Before stating what my problem is I want to clarify that there are multiple answers to my question out there, unfortunately, none of them is solving my problem. Please don't mark this as a duplicate. Now this is the code I have to create my text…
Vollan
  • 1,887
  • 11
  • 26
0
votes
1 answer

No SCNGeometry Available in SCNReferenceNode?

I'm downloading a collada file from a web server and would like to map textures programmatically, but there's SCNGeometry is nil. Can anyone give a suggestion? Below is sample code. let url = URL(string:…
Stev3
  • 158
  • 1
  • 8
0
votes
1 answer

SCNNode at camera position

I am trying to make my node start at the same position that I tap in a game but I can't figure it out here is my code for where to position the node. I get my location from the tap gesture recognizer by: let myLocation = recognizer.location(in:…
Jordan Heath
  • 114
  • 8
0
votes
1 answer

How can I move an SCNNode in SceneKit, but affected by gravity?

SCNAction.move(to:SCNVector3) doesn't work. It moves the shape but the shape doesn't fall. There's some other action?
Andrea P.
  • 55
  • 8
0
votes
1 answer

Programmatic rotation of an SCNNode that's part of an animated armature

I have an articulated character created and animated in Blender, imported into Xcode as a .dae. I load a "run" animation (another .dae) and apply it to the character's armature via .addAnimation(). Works fine. I would like to programmatically…
user1899931
  • 107
  • 6
0
votes
0 answers

How to applyForce to an SCNNode so that it goes in the direction of another SCNNode

How can I use applyForce() to an SCNNode so that it goes in the direction of another SCNNode? I do know the positions of both nodes. I am aware that I can use SCNAction.move(to: position, duration: 3), but that doesn't meet my needs - as I don't…
R Bradshaw
  • 173
  • 11
0
votes
0 answers

Rotating a childnode in scenekit which is mis-aligned with the primary axis of rotation.

I'm not sure of the correct terminology to describe this issue so I've posted two pictures demonstrating the problem. When using 3D models authored in 3rd party packages like SketchUp, you might encounter grouped geometry (childnodes) that are not…
Clay
  • 1,721
  • 2
  • 10
  • 18
0
votes
0 answers

Change anchor pivot of geometry object with ARKit

I am trying to rotate an object (essentially a cube from Maya) 90 degrees one way when tapped, then when tapped again it rotates -90 degrees. The rotation when tapped is working, however the pivot seems to be located at the origin (0,0,0), so it…
spoax
  • 471
  • 9
  • 29
0
votes
0 answers

SceneKit: imported OBJ model missing polygons

This OBJ model does not import successfully into SceneKit. (Model can be downloaded from the link.) As you can see from the screenshot, there are a few polygons missing from the backpack (on the right hand side) when viewed from Xcode. However, the…
Crashalot
  • 33,605
  • 61
  • 269
  • 439
0
votes
1 answer

Custom SCNGeometry not displaying diffuse contents as texture

I'm creating a custom SCNGeometry. To start, I'm developing it as a flat plane. It displays, and I can apply a colour to its' diffuse contents, but if I try and apply anything such as a UIImage, or a CALayer, it displays as white. Code: let…
Andrew
  • 7,693
  • 11
  • 43
  • 81
0
votes
2 answers

Image is shown as black and red colors only in ARKit

We are trying to create a SCNNode with a SCNMaterial which has an image (.png extension) in ARSCNView with the ARKit framework. The problem is that image rendering has a problem that image is shown as black and red colors only, it doesn't render…
ondermerol
  • 524
  • 1
  • 11
  • 29
0
votes
1 answer

How to Zoom .DAE 3D model using ARKit iOS

I have a 3D model with .scn extension. How to zoom it with pinch gesture without virtualobject file from iOS sample Placing Objects application. Pinch gesture works well with .scn's if its converted from .obj file. But its not working with .dae…
0
votes
1 answer

SCNNode Disobeying Position after Placement

I'm using Apples SceneKit and have a custom .dae asset. I've converted the asset to a .scn file. I am grabbing the SCNNode by name from the .scn file. After placing the SCNNode in my SCNView scene as a child node and setting it's position to be…
ZiggidyCreative
  • 335
  • 3
  • 16
0
votes
1 answer

SKLabelNode Hit Test

When conducting a hit test on an ARSCNView containing SCNNodes with SCNText geometry, it appears that the hit test will only be successful if the point tested lies inside a letter in the SCNText. This is not optimal, as it makes the nodes harder to…