Category "scenekit"

Use RealityKit ARView on macOS

I'm trying to use an ARView in a macOS-only project. I can load a scene (tested with a Reality file from Reality Composer), and it renders fine. But how do I co

SceneKit: How to constrain movement of a node to one axis locally, not the entire world

It's very easy to prevent movement of a node in one axis (X, Y, or Z) being moved by other forces with an SCNTransformConstraint.positionConstraint in world spa

Where's the particle system file in SceneKit in Xcode 11.3.1

Recently I updated my Xcode to 11.3.1. But while working with SceneKit, I found that I can't create a particle system file. Before After How can I create a

ARKit on different iPhones

I've been looking for an answer to whether ARKit, specifically ARSCNView, shows the same screen/view/scene size on all devices. I only have an iPhone XS so I am

SceneKit- Cannot query using bitmask

We were able to have custom raycasting using bitmasks: let hitTest = sceneView.hitTest(location, options: [categoryBitMask: bitmask]) But hitTest is deprecated

Can I load both obj and materials as an MDLAsset?

I have a directory containing an obj, mtl, and the textures. If I do let asset = MDLAsset(url: url) then it loads the mesh, but no textures. Now, if I go rename

Why 3d object added to scene view scene moves along with camera?

I have added 3d object to scene view scene which is in dae format. But its moving along with camera. How to fix it to a particular position. Same code works wit

How to programmatically export 3D mesh as USDZ using ModelIO?

Is it possible to programmatically export 3D mesh as .usdz file format using ModelIO and MetalKit frameworks? Here's a code: import ARKit import RealityKit impo

Is there someone who used animationDidStop or animationDidStart for SCNAnimation Player?

I am getting animation from a scene file with func animationFromSceneNamed(path: String) -> SCNAnimationPlayer? { let scene = SCNScene(named: path)

How to use "HEVC with Alpha channel" videos in SceneKit?

At WWDC 2019, Apple announced that it was now handling HEVC with Alpha in iOS, and state that it could be used in SceneKit. I've been trying for hours to make

Scene kit shape distorted

We built an iOS app to render 3D objects using Scene kit. We are plotting based upon coordinates(Vertices) received and populating our scene view inside Table c

SceneKit how to move a character on terrain with different height

I am working on a scene with a character and a platform with a stairs. Character must move up and down of the stairs and jump from the platform: I move charac

Is there any way to load FBX file using ARKit?

In my project I am projecting 3d files using ARKit. I am able to project .dae and .obj format models. Is there anyway I could load .fbx files?

Arrange SCNNodes in Circle

I'm creating multiple nodes automatically and I want to arrange them around me, because at the moment I'm just increasing of 0.1 the current X location. capsu

SceneKit Custom Geometry Shape not showing up

I am pretty new to Swift, and SceneKit, and my current problem is that the custom shape I am trying to create is not showing up, even though the primitive shape

How do I make a hexagon with 6 triangular SCNNodes?

I'm trying to make a hexagon grid with triangles without altering any pivot points, but I can't seem to position the triangles correctly to make single hexagon.

SceneKit – Why does adding spot light blacken the floor?

Screenshot #1 shows a simple SceneKit scene with only an ambient light (explicitly added, not the default one). Screenshot #2 shows what happens after adding a

Place multiple SCN objects in touchesBegan method

My Swift code below uses func touchesBegan to place a SCN object in the ARKit view. The problem is – it's only placing the object one time. I would like t

How to setup physical based rendering in SceneKit from code?

I want to present some scene with PBR. I created metalness and roughness textures and want to apply it to the mesh. When I try to do it in Xcode - everything is

Why SCNPhysicsBody resets position when set eulerAngles?

I'm trying to use SceneKit to develop a game for tvOS, and I'm having an issue. When I set the node's eulerAngle before apply an impulse to the physicsBody the