arkit

Why isn't my ARKit Video showing in app view

只谈情不闲聊 提交于 2020-01-05 06:26:07
问题 I have an ARKit that recognises two different tracking images Vuforia and Tracker It works when I have a different .scn for each tracker, and it hops between the two. I am trying to get the Tracker image to overlay a video player, I have tried everything I can think of but am now stuck. I have checked all the file names and links, but think I must be missing something to get the video player to fire up. Help! import UIKit import SceneKit import ARKit class ThirdViewController:

Add shadow to a 3D Object in ARKIT

£可爱£侵袭症+ 提交于 2020-01-04 05:09:30
问题 Can anyone please suggest me on how to add a shadow to a 3D object programmatically. Please see the below image. I want the same way to add a shadow under the chair programmatically. 回答1: // To Add Shadow on 3D Model Just Copy Paste this code and it will appear a shadow of 3D Model on Ground let flourPlane = SCNFloor() let groundPlane = SCNNode() let groundMaterial = SCNMaterial() groundMaterial.lightingModel = .constant groundMaterial.writesToDepthBuffer = true groundMaterial

Add shadow to a 3D Object in ARKIT

此生再无相见时 提交于 2020-01-04 05:09:11
问题 Can anyone please suggest me on how to add a shadow to a 3D object programmatically. Please see the below image. I want the same way to add a shadow under the chair programmatically. 回答1: // To Add Shadow on 3D Model Just Copy Paste this code and it will appear a shadow of 3D Model on Ground let flourPlane = SCNFloor() let groundPlane = SCNNode() let groundMaterial = SCNMaterial() groundMaterial.lightingModel = .constant groundMaterial.writesToDepthBuffer = true groundMaterial

In UnityARWorldMap, How will the user know if the GameObjects are Relocalized?

大城市里の小女人 提交于 2020-01-04 05:05:16
问题 I have tested the scene UnityARWorldMap.I have successfully relocalized ARworldmap.Once the models/Gameobjects are relocalized I want the tracking and detected planes to disappear.I found a class called UpdateWorldMappingStatus.cs .I tried to add some code similar to CheckWorldMapStatus method that is I added function CheckIfRelocalized method.Below is the given code. public class UpdateWorldMappingStatus : MonoBehaviour { public Text text; public Text tracking; // Use this for initialization

How to remove scnplane when touching again?

不想你离开。 提交于 2020-01-03 06:28:09
问题 I can able to add new scnplane when user tap on plane. But now, tap on same scnplane it adds again new scnplane instead of removing. Initially when reference image is detected , It will list cake in side of menu card with image, name and ratings. And user tap on rating, it will list user ratings. here is the code which i tried: override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) { //1. Get The Current Touch Location & Perform An ARSCNHitTest To Check For Any Hit SCNNode

How to remove scnplane when touching again?

时光毁灭记忆、已成空白 提交于 2020-01-03 06:28:06
问题 I can able to add new scnplane when user tap on plane. But now, tap on same scnplane it adds again new scnplane instead of removing. Initially when reference image is detected , It will list cake in side of menu card with image, name and ratings. And user tap on rating, it will list user ratings. here is the code which i tried: override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) { //1. Get The Current Touch Location & Perform An ARSCNHitTest To Check For Any Hit SCNNode

Detect planes in ARKit

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-03 04:20:07
问题 How do I get notified when the app has detected at least one plane in ARKit? I'm currently doing something like this but it's not firing/it's not related: extension MyViewController: ARSCNViewDelegate, ARSessionDelegate { internal func setupAR() { let scene = SCNScene() sceneView.scene = scene let configuration = ARWorldTrackingConfiguration() configuration.planeDetection = [.horizontal] sceneView.session.delegate = self sceneView.session.run(configuration) } public func session(_ session:

ARKit code issue {unknown error -1=ffffffffffffffff error: Task failed with exit 1}

对着背影说爱祢 提交于 2020-01-03 03:22:13
问题 I want to learn ARKit. I got apple's sample code and other sample codes in github. There is a error, Xcode reports: /Users/.../ARKitBasics-brwextbgckvaokheuvfoqkacalvx/Build/Products/Debug-iphoneos/ARKitBasics.app/Frameworks/libswiftARKit.dylib: unknown error -1=ffffffffffffffff error: Task failed with exit 1 signal 0 { /usr/bin/codesign '--force' '--sign' 'B8FBC6429C19D8DBEDBAC1BD044D6D4D7B68D1CF' '--verbose' '/Users/.../ARKitBasics-brwextbgckvaokheuvfoqkacalvx/Build/Products/Debug-iphoneos

iOS 11 ARKit : Drag Object in 3D View

六眼飞鱼酱① 提交于 2020-01-03 01:46:23
问题 I have a node object in 3d view and i need to drag that object, So far i have tried from here : Placing, Dragging and Removing SCNNodes in ARKit and converted in swift @objc func handleDragGesture(_ gestureRecognizer: UIGestureRecognizer) { let tapPoint = gestureRecognizer.location(in: self.sceneView) switch gestureRecognizer.state { case .began: print("Object began to move") let hitResults = self.sceneView.hitTest(tapPoint, options: nil) if hitResults.isEmpty { return } let hitResult =

What's the difference between ARAnchor and AnchorEntity?

百般思念 提交于 2020-01-02 19:13:50
问题 I'm currently doing some experiments with RealityKit. I've been looking at some sample code, and I'm a bit confused about the differences between ARAnchor and AnchorEntity , and when to use one over the other. So far I know that: Both are anchors that describes a position in the real world. AnchorEntity can also have other Entity 's as children, so you can add model objects directly to the anchor. You can't do this with ARAnchor , you have to add model objects "manually" to the rootNode , and