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

How to zoom-out object in SceneKit?

I am creating cube in scene kit. this is output. You can see images are not size to fit in SceneView. Here is my code : SCNScene *scene = [[SCNScene alloc]init]; float X = 0.0; float Radius = 1.0; for (int i = 0; i<3; i++) { SCNBox *Box =…
user8579808
0
votes
1 answer

How do I find the SCNMatrix4 transformation that moved an SCNNode from one point on a sphere to another?

I am trying to reorient a cone so that it sits with its base flat on the surface of a sphere as I move it around the sphere. The sphere is radius 4 and centred at the origin. I tried to deduce the quaternion for the transformation, but it seems…
Tim
  • 1,108
  • 13
  • 25
0
votes
0 answers

UISwipeGestureRecognizer for SceneKit?

Is there something like a UISwipeGestureRecognizer for SceneKit? Suppose I want to swipe on a SCNNode, is that possible? Thank you!
Amit Kalra
  • 4,085
  • 6
  • 28
  • 44
0
votes
1 answer

Placing "SCNNode" at a given position and facing "SCNCamera" with offset around Y-axis

So, I have the exact position I want to place the node at. If I test things with a sphere geometry I can place spheres in the world by telling the node: node.simdPosition = position (I provide the "position" as an input to the function). That…
zumzum
  • 17,984
  • 26
  • 111
  • 172
0
votes
1 answer

SCNNode direction issue

I put a SCNNode to a scene. I want to provide proper rotation in space, because this node is a pyramid. I want Z axis to be pointed to V2 point, and X axis to be pointed to V1 point (these V2 and V1 point are calculated dynamically, and of course in…
Paul T.
  • 4,938
  • 7
  • 45
  • 93
0
votes
1 answer

Constraint the position and rotation of an object with respect to another in scenekit ios swift

I am new to iOS and scenekit. I have an scn scene which contains a rigged model of a human body (skin and skeleton). And two other collada (.dae) files containing a gun and an animation to move hands. How can I attach the gun to the model's hand so…
sharma_cg
  • 1
  • 1
0
votes
0 answers

SCNScene how to change eulerAngles?

How can I change eulerAngles on SCNScene? scene.pointOfView?.eulerAngles = SCNVector3(x:0, y:20, z:0) doesn't work. What I need to change euler? I need to use 3D arrow in compass app.
kacperup
  • 11
  • 2
0
votes
1 answer

How to make SCNNode spin Horizontally when user spins

I'm trying to figure out how to make a SCNNode rotate ONLY horizontally when a user is spinning the object in that way. Like spinning a basketball on your finger as an example. Is there a way to do that? I haven't been able to figure it out! Sorry…
Amit Kalra
  • 4,085
  • 6
  • 28
  • 44
0
votes
1 answer

How to draw different images on each side of SCNPlane Geometry

My ultimate goal is to have an SCNNode representing an image floating in space. This is more or less easily accomplished with the current code I have below, but the problem is that the back side of the image isn't rendered and is thus transparent…
TheBrownCoder
  • 1,186
  • 1
  • 10
  • 18
0
votes
1 answer

SCNNode clone() adds more light to the scene as nodes are cloned

i am trying to add multiple 3d objects with shadows in my ARKit code. I create node like this func loadNodaA() { isObjectCoordinatesAtCentre = false let scaleFactor = 0.005 let dragonScene =…
AKumar
  • 381
  • 6
  • 16
0
votes
0 answers

Can't take SCNNode from SceneView in ARKit

I'm trying to move SCNNode and I'm using this solution. But when I do: let start = sceneView.node(for: first) my application freezes and Xcode doesn't do anything. EDIT: func startBouncing(time: TimeInterval) { guard let sceneView =…
0
votes
2 answers

How to align 2 SCNNode's together horizontally?

I'm trying to align two SCNNodes together but can't seem to figure out how. This is what I have right now: cube.scale = SCNVector3(x: 0.1, y: 0.1, z: 0.1) cube.position = SCNVector3(0, 3, -3) cubeTwo.scale = SCNVector3(x: 0.15, y: 0.15, z:…
Amit Kalra
  • 4,085
  • 6
  • 28
  • 44
0
votes
3 answers

SCNNode.removeFromParentNode() and rendering loop

i have a question regarding removing SCNNodes I have a function that makes a SCNNodes, when the Node is ready I add it with: scene.rootNode.addChildNode(node) then I make a new SCNNode with the function and like to remove the old one and add the…
M. P.
  • 107
  • 1
  • 10
0
votes
1 answer

How can I reset an SCNNode's SCNPhysicsBody without resetting the SCNNode's position?

I have a sceneKit app for iOS. I have an SCNPhysicsBody attached to an SCNNode. I set the .physicsBody to nil, make some changes the SCNNode and then set the .physicsBody to a new SCNPhysicsBody or to a copy of the original SCNPhysicsBody. In either…
Howard Shere
  • 143
  • 1
  • 7
0
votes
0 answers

Scenekit: Animating Camera Node While Using Constraints

I am attempting to animate the camera node in Scenekit while having the camera look at a specific point with a constraint. For some reason activating the constraint locks the camera position. Is there a specific reason this does not work or what am…
Pete
  • 213
  • 1
  • 13