scenekit Questions

3

Solved

The documentation for SCNMaterialProperty.contents states that it is an animatable property and indeed I can perform a crossfade between two colors. However I’m unable to crossfade between two imag...
Anchylose asked 20/10, 2015 at 11:9

4

Solved

I have a SceneKit game in swift and in it I have a car with a dynamic physics body that is set up like this: let carScene = SCNScene(named: "art.scnassets/truck.scn")! let carNode = carScene.root...
Kimi asked 15/8, 2017 at 16:9

4

Solved

In trying to serialize an array of float3 objects with the basic JSONEncoder, it's revealed that float3 does not conform to the Codable protocol, so this cannot be done. I tried to write a basic e...
Folberth asked 29/1, 2018 at 1:45

4

Solved

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 node is reset to his original positio...
Evert asked 4/12, 2015 at 16:11

1

Generally what I'm trying to achieve: we have map data that historically was all 2D, and the coordinate system we use is the origin point (0,0) at the top left, positive x goes right, positive y go...
Unconditional asked 24/2, 2016 at 17:25

2

Running a SpriteKit particle system in the overlaySKScene property of a SCNView causes the app to crash with the stack trace below. Based on the stack trace, it seems like it's all system code run...
Quinn asked 23/3, 2018 at 7:27

5

Solved

I want to open a 3D model and make its background transparent, so that I can see the UI behind the SceneView. I've tried this code, but sceneView becomes white, not transparent. struct ModelView: ...
Preadamite asked 16/5, 2021 at 14:19

1

Is it possible to cause a node to render "clear" such that when in is drawn, any views underneath the scene view are shown where the node would normally be shown? For example, assume that our SCNV...
Alfy asked 10/4, 2016 at 20:11

1

Solved

I am working on an iOS app with Swift and SceneKit. When user taps on screen, I want to render a dot in SceneKit at the location that user just tapped. How can I do that? I am using unprojectPoint(...
Manslayer asked 14/6, 2023 at 15:29

3

Solved

The goal is to recreate the lighting for this OBJ file: https://poly.google.com/view/cKryD9VnDEZ Code to load OBJ file into SceneKit (can download file from above link): let modelPath = "model.ob...
Imbibe asked 21/1, 2018 at 1:0

5

Solved

Here is the error I am getting, check the attached picture for more info. com.apple.scenekit.scnview-renderer (17): EXC_BAD_ACCESS (code=1, address=0xf000000010a10c10) Here is a log of the err...
Roguery asked 2/11, 2018 at 21:45

4

Solved

What is the standard method for smooth camera movement within SceneKit (OpenGL)? Manually changing x,y isn't smooth enough, yet using CoreAnimation creates "pulsing" movement. The docs on SceneKit ...
Gallegos asked 26/9, 2012 at 0:52

8

Solved

Hi I am trying to remove all nodes from my Scenekit scene but I cannot for the life of me figure out a way. It seems logical to me that there must be a function for doing this automatically but I...
Capitalization asked 26/2, 2015 at 9:23

4

I am working with iOS 11 (for ARKit) and while many point to a sample app for SceneKit from Apple with a Fox, I am having problem with the extension it uses in that sample project (file) to add ani...
Spillage asked 1/9, 2017 at 23:17

1

Solved

Go to mixamo.com, pick a character, tap animations, pick one, simply download as .dae. Have the file on your Mac desktop; tap file info). It will perfectly animate the character move. Xcode, drag ...
Edsel asked 12/1, 2023 at 0:49

2

Solved

I looked at Banana game from WWDC which is written in Objective-C was trying to convert the code to Swift for importing animation and transitioning between them but I am having problems running the...
Saddlebag asked 4/2, 2015 at 6:49

5

In my project I'm positioning 3d files using ARKit. I'm able to load .dae and .obj format models. Is there any way I could load .fbx files?
Chancre asked 7/6, 2019 at 12:4

7

Solved

I am having trouble understanding how geometry from .dae files should be loaded into an iOS SceneKit scene graph. I know that you can load .dae files directly into an SCNScene: // create a new sc...
Sylviasylviculture asked 18/8, 2014 at 4:20

3

Solved

I am trying to calculate the time it takes a vehicle to go between two checkpoints. I have setup the following timer to achieve this. func startTimer() { if hasStarted == true && timerSta...
Lance asked 12/6, 2018 at 22:12

3

Solved

The image below shows a rotated box that should be moved horizontally on the X and Z axes. Y should stay unaffected to simplify the scenario. The box could also be the SCNNode of the camera, so I g...
Mightily asked 5/4, 2017 at 17:25

0

This question is roughly related to this one. I have a SceneKit project in which memory management has been a challenge (yes, even with ARC). By loading images in a very specific way, by using weak...
Persiflage asked 13/12, 2022 at 7:14

3

You can now convert 3D models to .usdz files (uncompressed zip archive) using Apple's command line tool bundled with Xcode 10 beta. Example code to convert an .obj file to .usdz: xcrun usdz_conve...
Meryl asked 24/6, 2018 at 10:39

0

Consider the following code: let img = UIImage(named: "myString") if let img = img { mySCNMaterial.diffuse.contents = img } I was using this to load images in a SceneKit project. Speci...
Luby asked 7/12, 2022 at 7:41

3

Goal: SceneKit hit test with SwiftUI (instead of UIKit) Problem: When I embed the default ship scene on a SwiftUI "UIViewRepresentable", the example handleTap function doesn't work. and I get his ...
Unexceptionable asked 15/6, 2020 at 16:9

5

Solved

How do I create a material in SceneKit that plays a looping video?
Millhon asked 26/2, 2017 at 13:21

© 2022 - 2025 — McMap. All rights reserved.