Questions tagged [scnsphere]

11 questions
7
votes
1 answer

SCNGeometry with polygon as primitiveType

Trying to figure out how I create a SCNGeometry with polygon as primitiveType, My goal is to add polygon shaped node as a child of a sphere node, and make it look like MKPolygon for map kit, like in this example. My current code is: //Take an…
ItayAmza
  • 819
  • 9
  • 21
2
votes
1 answer

Is it possible to draw a clear SCNSphere with a bright red SCNSpotlight?

The last few days I am struggling a bit with SceneKit. I am trying to plot a clear/transparent SCNSphere, with a red spotlight. It appears that my red spotlight is becoming transparant as well if I set my SCNSphere to transpararent / clear colour.…
Rosa90
  • 21
  • 4
2
votes
1 answer

SceneKit: Make child sphere visible inside semi-transparent parent sphere?

In SceneKit, say you want to embed a node, Child, inside a semi-transparent node, Parent, such that Parent acts like a "cage" you can see through and view Child. Concretely, say Parent is a SCNSphere with radius 2. Child is a SCNSphere with radius 1…
Crashalot
  • 33,605
  • 61
  • 269
  • 439
1
vote
1 answer

Getting location of tap on SCNSphere - Swift (SceneKit) / iOS

I want to create a sample application that allows the user to get information about continents on a globe when they tap on them. In order to do this, I need to figure out the location where a user taps on an SCNSphere object in a scene (SceneKit). I…
agandecha
  • 53
  • 6
1
vote
0 answers

How to choose proper radius for SCNSphere?

I'm working on a 360 image viewer and I use SCNSphere for that. The question is what radius should I use when I create a sphere? So far I noticed that setting a radius anywhere between 10 and 100 works just fine on my image. However, assuming that…
ymotov
  • 1,449
  • 3
  • 17
  • 28
1
vote
0 answers

Axes rotate with SCNNode

If I rotate a sphere around the x-axis 90degree, the axes rotate with it. So the y-axis which is vertical first has now the position of the z-axis at the start. I want my axes fixed, so that if i rotate around x-axis (1,0,0) it always rotates from…
Emanuel Huser
  • 178
  • 1
  • 11
1
vote
0 answers

SceneKit: custom scene a half of sphere, but have black point on the bottom, how to refine this point?

half of sphere by using "geometrySourceWithData" CODE like: NSData *indicesData = [NSData dataWithBytes:indices length:sizeof(indices)*indexCount]; SCNGeometryElement *indicesElement = [SCNGeometryElement …
JNYJ
  • 515
  • 6
  • 14
0
votes
0 answers

Scenekit - Calculate radius of projected sphere in screen pixels to positioning label always below node

How can I calculate the radius of a projected sphere in screen pixels to position the label below my SCNNode? Currently I place the label in the center of the node. My SCNCamera has usesOrthographicProjection = false, because the user can move the…
0
votes
1 answer

How to not rotate Wrapped Text in SCNSphere when Scene/Camera is rotated by user

let dotGeometry = SCNSphere(radius: 0.0005) let dotNode = SCNNode(geometry: dotGeometry) dotNode.position = dotPosition if let image = imageWithText(text: "\(index)", fontSize:20, imageSize: CGSize(width:100,height:100), backgroundColor: .cyan) { …
Kashif
  • 4,642
  • 7
  • 44
  • 97
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

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