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 getBoundingBoxMin

I have a node that I'm extracting from an SCNScene. I've got some information about it, but I'm confused about one thing - how the bounding box is calculated. The node is positioned once it is loaded at vector 0,0,0 using: [myNode setPosition:…
Roo
  • 259
  • 1
  • 3
  • 15
0
votes
1 answer

Material only attaches to half of the textures on geometry

My materials are only applying to half of the faces. Here is my code: let boxGeometry = SCNBox(width: 10, height: 10, length: 10, chamferRadius: 0) let boxNode = SCNNode(geometry: boxGeometry) boxNode.position = SCNVector3Make(0, 0,…
Sam Kirkiles
  • 304
  • 5
  • 13
0
votes
1 answer

Running a SCNNode animation just once on Scene Kit

I'm trying to run an animation from a .dae file (3D model file) just once, this is my code: SCNNode *object = (SCNNode*)[self getMyPlayerObject]; NSString *key = @"hit"; CAAnimation *animation = [_animations[key] copy]; [animation…
c4b4d4
  • 964
  • 12
  • 32
0
votes
1 answer

Avoid 3D nodes to get cut

I'm having a problem with big SCNNodes, they are getting cut like this: How do I avoid this? Is it something to do with the camera? With the SCNView size? With the size of the SCNNode? The SCNNode has this scale: node.scale = SCNVector3Make(100,…
c4b4d4
  • 964
  • 12
  • 32
0
votes
1 answer

SceneKit – How does the option impulse works for the method applyForce?

When applying a force on a dynamic body, it seems that this force won't be persistent even if impulse is set at false. I have a sphereNode with a physicsBody : dynamic, mass=1 and damping=0. World gravity is set at (0,0,0). If I apply a force in a…
Tanguy
  • 838
  • 4
  • 15
0
votes
2 answers

How do I make a scnView smaller than the screen size?

ViewController import UIKit import SceneKit class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() let scnView = self.view as SCNView scnView.backgroundColor =…
swl
  • 129
  • 2
  • 12
0
votes
1 answer

Control an object by physics

I read the example in the apple documentation (Scene Kit Vehicle) and they use SCNPhysicsVehicle on the vehicle. SCNPhysicsVehicle allows to set speed, brake and everything. I want to be able to control a SCNNode (containing a SCNSphere). What is…
mathieug
  • 901
  • 1
  • 11
  • 24
-1
votes
0 answers

CNN getting only one output for all inputs

I am trying to input non-image data into CNN as matrices. The data is approximately 24 x 20 where 20 is the batch size. This is stock market data where the should be 0 - Sell or 1 - Buy, however for all the data I input into the model, I am getting…
-1
votes
1 answer

Swift SCNAction, rotate to a quaternion

I have a planeNode in a SceneKit Scene which I want to control. For this I want to constantly update the Orientation. Due to the Singularities of Euler Angles I am using Quaternions. So far I am directly updating planeNode.orientation and it works…
alexismue
  • 29
  • 5
-1
votes
1 answer

Swift: Detect swiping across SCNNode

Is there any way to detect when the user swipe across SCNNode? I ve already tried UISwipeGestureReconizer but it didn't work for me. Any ideas?
psrajer
  • 83
  • 2
  • 5
-1
votes
1 answer

Scale down SCNNode based on its SCNView size or phone screen size

I have a big SCNNode and I want to scale it down. Currently node is scaled down based on a magic number. However the node should be scaled down based on the phone's screen size or node's SCNView size. To make things easier I thought of having a…
ddeger
  • 1
1 2 3
26
27