A representation of a three-component vector.
Questions tagged [scnvector3]
15 questions
4
votes
2 answers
How to Convert a SCNVector3 position to a CGPoint SCNView coordinate?
I have this app that just works in landscape.
I have an object on scenekit. That object is at a certain position, specified by:
SCNNode * buttonRef = [scene.rootNode childNodeWithName:@"buttonRef" recursively:YES];
SCNVector3 buttonRefPosition =…

Duck
- 34,902
- 47
- 248
- 470
3
votes
1 answer
How to get the SCNVector3 position of the camera in relation to it's direction ARKit Swift
I am trying to attach an object in front of the camera, but the issue is that it is always in relation to the initial camera direction. How can I adjust/get the SCNVector3 position to place the object in front, even if the direction of the camera is…

Tal Zion
- 6,308
- 3
- 50
- 73
3
votes
0 answers
Swift scene kit: move SCNNode to tap position?
Ok, working with ARKit in Swift here and trying to get a grip on this -
for my game controls I want to be able to control the point (position in 3d space) that the SCNNode is moving towards when the users finger is down on the screen, meaning…

blue
- 7,175
- 16
- 81
- 179
2
votes
1 answer
Creating an array of SCNVector3 using Float in Swift
I have a bunch of Z coordinates in an array. I want to create geometry using these values, thus I created an array of SCNVector3. X and Y values will be calculated using a simple nested loop, but the Z values will come from my array.
Xcode is…

NoOneHere
- 109
- 1
- 9
2
votes
1 answer
Convert CGPoint from a View to SCNVector3 in sceneKit
I am using AVFoundation for front camera View. From the Front camera, I'm detecting the Face from each frame using vision framework. From that, I'm able to get CGPoints of nose. Now, I want to add a 3D object on one of the nose points using sceneKit…

Himanshu Ahuja
- 197
- 1
- 13
2
votes
0 answers
Detecting what coordinates I have selected within a displayed model .obj in iphone sdk
I have a OBJ files that I am able display in SCNView.I need some means of detecting what coordinates I have selected within a displayed model.Want to select Particular Selection.

Piyush Patil
- 45
- 5
1
vote
0 answers
Lat/Long to SCNVector3 for ARSCNView
I'm trying to build an AR App which places an object with ARSCNView Scene based upon its Longitude and Latitude.
I need to convert latitude and longitude values to a point in the 3-dimensional space relative to my phones latitude and longitude. I've…

duck1970
- 127
- 10
1
vote
1 answer
Get World Coordinates of CGPoint in ARSCNView (Swift)
Problem
I'd like the following function to return to me the world coordinates of a point handled by a tap gesture. I've properly implemented it (using a few online resources) to work with the center point of the frame, but I am having trouble…

Anthony Krivonos
- 4,596
- 4
- 16
- 31
1
vote
1 answer
How to detect if SCNBox was touched in scenekit?
How to detect if SCNBox was touched in scenekit? I am building a VR app

Andruino
- 9
- 1
- 3
0
votes
1 answer
Finding a better method to identify points exist "inside" of a cube in swift
I want to find a way to check if points(vectors) in my scene are contained within a SCNBox I have displayed on screen. Currently I have an array of about 83000 SCNVector3's. So far, I do this by simply running a for loop on each point and checking…

7ucci
- 1
0
votes
1 answer
Place node in front of the camera and rotate
I want to show a pointer when a user double taps on a sceneView. For this, I want to use SCNTorus because at some angle it is a circle.
let geometry = SCNTorus(ringRadius: 0.01, pipeRadius: 0.001)
let node = SCNNode(geometry: geometry)
I already…

Nikolai Prokofev
- 184
- 3
- 14
0
votes
0 answers
Join Vector3 with BoxBuffer Geometry to make a proper angle join using Threejs
I want to create a view which has 6 sides mentioned in the image respectively, we have created all sides and joined respectively but we are stuck at a point when we need to create a side with some angle and need to join with the horizontal side
We…

Mohammad Zeeshan
- 825
- 1
- 9
- 20
0
votes
1 answer
Save value of SCNVector3 with UserDefaults in Swift
I am trying to save and load an SCNVector3, this is the code that I use to save and load the vector:
//Definition of the two vectors
let storedVector = SNCVector3Make(0,0,0)
let vector = SNCVector3Make(1,1,1)
let defaults =…

Calonca
- 125
- 1
- 7
0
votes
0 answers
Google Vision, use SceneKit to create face masks
I am developing an iOS application in Objective-C, I need to apply on a detected face( using google vision's system) a .scn file. After set up a SceneView with a 3D object stored in a Node... I need to a apply it to a face:
SCNVector3…

Kuajia
- 31
- 1
- 9
0
votes
0 answers
How to make SCNNode Position same for Child and Parent Nodes?
I have a scene with a child node named wc. I want to add dae/model file on that node.
I was able to add the model/dae via following:
Create parent scene with dae asset from bundle
Add parent scene to the scnView and typecast it to self.view
Get the…

madLokesh
- 1,860
- 23
- 49