scenekit

autoenablesDefaultLighting is too bright in iOS 12 and SCNView.pointOfView is not effective

为君一笑 提交于 2020-01-15 20:12:50
问题 I am using SceneKit’s autoenablesDefaultLighting and allowsCameraControl functions of my sceneView to provide light to an obj 3D model in the app and rotate around this object in Objective-C. Since upgrading to iOS12, the default light intensity of autoenablesDefaultLighting gets higher and the 3D model looks so bright! Did anyone faced the same issue? If yes, is there a way to control the light intensity of autoenablesDefaultLighting when its value is ‘YES’? If it is not editable, I tried to

autoenablesDefaultLighting is too bright in iOS 12 and SCNView.pointOfView is not effective

天涯浪子 提交于 2020-01-15 20:11:29
问题 I am using SceneKit’s autoenablesDefaultLighting and allowsCameraControl functions of my sceneView to provide light to an obj 3D model in the app and rotate around this object in Objective-C. Since upgrading to iOS12, the default light intensity of autoenablesDefaultLighting gets higher and the 3D model looks so bright! Did anyone faced the same issue? If yes, is there a way to control the light intensity of autoenablesDefaultLighting when its value is ‘YES’? If it is not editable, I tried to

autoenablesDefaultLighting is too bright in iOS 12 and SCNView.pointOfView is not effective

。_饼干妹妹 提交于 2020-01-15 20:10:21
问题 I am using SceneKit’s autoenablesDefaultLighting and allowsCameraControl functions of my sceneView to provide light to an obj 3D model in the app and rotate around this object in Objective-C. Since upgrading to iOS12, the default light intensity of autoenablesDefaultLighting gets higher and the 3D model looks so bright! Did anyone faced the same issue? If yes, is there a way to control the light intensity of autoenablesDefaultLighting when its value is ‘YES’? If it is not editable, I tried to

Error “OBJ file has no faces”

一曲冷凌霜 提交于 2020-01-15 09:57:26
问题 I want to place an obj-3D-Model with ARKit and SceneKit. That's the model I'm using: https://free3d.com/3d-model/chest-50529.html I'm using the following code: private func createChestFromScene(_ position: SCNVector3) -> SCNNode? { guard let url = Bundle.main.url(forResource: "art.scnassets/Models/chest", withExtension: "obj") else { NSLog("Could not find door scene") return nil } guard let node = SCNReferenceNode(url: url) else { return nil } node.load() // Position scene node.position =

How to rotate an SCNBox

旧城冷巷雨未停 提交于 2020-01-15 03:57:32
问题 I'm trying to rotate an SCNBox I created using swipe gestures . For example, when I swipe right the box should rotate 90degs in the Y-axis and -90degs when I swipe left. To achieve this I have been using the node's SCNAction.rotateByX method to perform the rotation animation. Now the problem I'm having is when rotating along either the X-axis or Z-axis after a rotation in the Y-axis and vice-versa is that the positions of the axes change. What I have notice is that any rotation perform on

How to rotate an SCNBox

我只是一个虾纸丫 提交于 2020-01-15 03:57:08
问题 I'm trying to rotate an SCNBox I created using swipe gestures . For example, when I swipe right the box should rotate 90degs in the Y-axis and -90degs when I swipe left. To achieve this I have been using the node's SCNAction.rotateByX method to perform the rotation animation. Now the problem I'm having is when rotating along either the X-axis or Z-axis after a rotation in the Y-axis and vice-versa is that the positions of the axes change. What I have notice is that any rotation perform on

Using MapKit in SceneKit

徘徊边缘 提交于 2020-01-15 03:56:14
问题 This must be a very basic question to the pros out there. I have done quiet a bit of googling and cant find the answer I wanted. Is it possible to use MapKit in SceneKit to render animated characters on the map ? If it is not possible how is it done when it comes to Open World type games. I basically want to make a game that has the world map as background which can be zoomed in/out. Also need to show some game options based on user's location. All the examples I have seen is using a

ScenKit eulerAngles strange values during rotation

↘锁芯ラ 提交于 2020-01-14 10:22:54
问题 I'm rotating a SCNNode using the following lines: let rotate = SCNAction.rotateByAngle(CGFloat(M_PI), aroundAxis:SCNVector3Make(0, 1, 0), duration: NSTimeInterval(10.0)) let repeat = SCNAction.repeatActionForever(rotate) node.runAction(repeat) and i print the eulerAngles.y of the node in the render method: let rad = Double(node.eulerAngles.y) var angleInDegrees = fmodf(360.0 + -Float(rad) * (180.0 / Float(M_PI)), 360.0) println("eulerAngles.y rad:\(rad) degree:\(angleInDegrees)") but I get

Unable to rotate an SCNNode in ARKit

末鹿安然 提交于 2020-01-14 00:30:13
问题 I'm trying to rotate an SCNNode on the y-axis so my node (an arrow) points in the right direction. I want to make a navigation app that uses ARKit; each arrow needs to point to the next location of the route I have received. The retrieval of the route works properly. The nodes are added to the rootNode of the scene. At some point I traverse an array of nodes to position them in the scene and apply scaling to the node (based on the distance), which is all done correctly. However, when I apply

SceneKit: advice on reproducing glowing light trail like with Tron light cycles

China☆狼群 提交于 2020-01-13 22:42:09
问题 The goal is to reproduce a light trail similar to the image below in SceneKit. The trail doesn't need to be as detailed, but the idea is to achieve a similar visual effect. We tried using thin cubes with opacity around 0.5. We strung about 200 together and attached them to a node to act as a light trail. That was not performant at all. This other post suggests using particle emitters, but we also need to detect collisions when another object hits the trail. Class documentation says collision