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

SCNNode won't scale below .65

I have a custom dae file and am wanting to scale it down to fit in some areas, what I have found, unfortunately, is that if the scaling factor falls below .65, the node isn't rendered for some reason. I'm not sure what I am doing wrong. Here is the…
Ian Oswald
  • 1,365
  • 3
  • 16
  • 27
0
votes
1 answer

Anti-gravity physics in SceneKit

I am trying to make a simple app where if you tap the screen a box is switched from floating to affected by gravity. I can't seem to find a way to make the box float in the air though. This code here takes care of half the problem: …
Nicholas L.
  • 293
  • 2
  • 3
  • 9
0
votes
1 answer

SceneKit: Changing shader parameters have no effect on object

I have created an object on Maya and exported to a dae file. That object is a cylinder wrapped in a texture. The shader, created on maya and imported into SceneKit is a Phong with the following characteristics: I add an omni light to the scene with…
Duck
  • 34,902
  • 47
  • 248
  • 470
0
votes
2 answers

SceneKit: Changing the pivot/axis of SceneKit text

I have created this SceneKit text by dragging a 3D Text to the scene using Interface Builder. It was created like this: The axis is on the lower left. Is there a way to center the axis on that text using interface builder?
Duck
  • 34,902
  • 47
  • 248
  • 470
0
votes
1 answer

SCNMaterial with text not appearing over SCNMaterial with image

I have an SCNNode (made up of an SCNPlane) with an image on it, and I want to put text over the image. I understand that an SCNNode can have different materials. My problem is that I can load an image on the SCNNode, but the text does not appear…
0
votes
2 answers

enumerateChildNodesUsingBlock(), setting stop to true

I am attempting to use enumerateChildNodesUsingBlock() where I set stop to true so the enumeration will ignore child nodes. There is a similar question: How to use "enumerateChildNodesWithName" with Swift in SpriteKit? But nothing I try sets stop to…
bpedit
  • 1,176
  • 8
  • 22
0
votes
1 answer

Use PhysicsBody to rotate an SCNNode to match the Thumbstick's radian

I'm working on a top-down space game built using Swift and SceneKit with the following setup: SCNNode representing a spaceship Rotation is constrained to the y axis; values range from -M_PI_2 to M_PI + M_PI_2 Movement is constrained to the x and z…
Kokaubeam
  • 646
  • 6
  • 8
0
votes
1 answer

SceneKit follow camera?

I am trying to make a follow camera in scenekit. I have just started, so try to bear with me. I have a node (robotNode) and am trying to have the camera follow the robot. I have partially achived this by doing adding the camera as a child node of…
Minebomber
  • 1,209
  • 2
  • 12
  • 35
0
votes
0 answers

Can we specify UIColor value in CABasicAnimation?

I want to add a glowing animation for a 3D ball let ball = SCNNode(geometry: SCNSphere(radius: 20)) let highlightAnimation = CABasicAnimation(keyPath: "contents") highlightAnimation.toValue = UIColor.yellowColor() highlightAnimation.fromValue =…
0
votes
1 answer

Xcode 7 SceneKit object's position property does not update when moved?

So I'm making a game and in said game, you will use a DPad to move your ball around the scene. I'm using Xcode 7 Beta 5 though the same problem existed in beta 4. Here is the code of a test view controller: class TestController:…
Nerdy Lime Apps
  • 331
  • 2
  • 5
  • 18
0
votes
1 answer

How to create an array of SCNNode in swift

I want to create a fund to create an array of nodes. My declaration is as follows: func createSphereNode () { var spheres = [SCNNode()] let sphereGeometry = SCNSphere(radius: 2.5) let sphereMaterial = SCNMaterial() …
0
votes
2 answers

Does performing a SCNAction on a SCNNode change the nodes position?

I was wondering if anyone knew if you perform a SCNAction on a node, is there a way while that node is executing the action, where you could find out what position it's in the scenes coordinate system? Lets say I have two SCNNodes A and B... SCNNode…
Chris
  • 21
  • 4
0
votes
0 answers

Rotate SCNNode around parent's axis using an action

I have a bunch of SCNNode's that all share the same parent. I can rotate a group them around their own axes using func handleTap(gestureRecognize: UIGestureRecognizer) { let sceneView = self.view as SCNView let action =…
JuJoDi
  • 14,627
  • 23
  • 80
  • 126
0
votes
2 answers

Node group's position is reset at the start of SCNNode.runAction

I have some code that rotates several SCNNodes around the x axis when the screen is tapped like so: func handleTap(gestureRecognize: UIGestureRecognizer) { let sceneView = self.view as SCNView let slice = self.cubes[0...8] let container…
JuJoDi
  • 14,627
  • 23
  • 80
  • 126
0
votes
1 answer

SceneKit – Making a custom physics body

So I've designed a hallway that I want my player to walk through, but I can 't seem to get a physics body to work for it. Either the player walks through the walls or he can't walk down the hallway because it sees the object as a giant cube. How…
1 2 3
26
27