Thanks for the tutorials 0) statement to avoid flooding the screen with the balls: if (Input.touches[0].phase == TouchPhase.Began) { Debug.Log("Touch Pressed"); touchPosition = Input.GetTouch(0).position; return true; }
@rahuldev1590
5 жыл бұрын
Hi Dilmer,i want to thank you for providing us as a developer THE BEST tutorials of AR on youtube.Ireally appreciate it from the bottom of all AR developers heart. I am trying to create a wall coverings wallpaper app using ARFoundation, it would be great if you could create a tutorial for the same.Thanks again😊
@dilmerv
5 жыл бұрын
That’s a cool idea and also thank you for your super nice message :) I appreciate you as well for your insight and time in the channel. The request is something I would be happy to do, let me add it to my todo list and yes it would be available in the channel over the next few days :)
@rahuldev1590
5 жыл бұрын
Thanks Dilmer for your quick reply and appreciation for idea.Eagerly waiting for the tutorial.
@rahuldev1590
5 жыл бұрын
Hi Dilmer,did u get the chance to work on it.i am eagerly waiting for the tutorial.please please please make tutorial for this
@rahuldev1590
4 жыл бұрын
Hi Dilmer,I m facing challenge s in vertical plane detection as it is not working for plane white wall.it would be great if you could provide some info how to do that pls
@dilmerv
4 жыл бұрын
Hi Rahul how are you man ? So you mean it doesn’t detect wall surfaces that are white ? I can do some testing and find out but it probably will be towards the end of the week.
@devantamot9259
5 жыл бұрын
Thanks for the tutorial! This stuff is pretty new to Unity, so I really appreciate the tutorial on this topic. Keep up the good work!
@dilmerv
5 жыл бұрын
Hi Devan thanks for watching the video and also for your feedback :) I have a lot more videos coming this week !
@HeadPack
4 жыл бұрын
Absolutely awesome what you do to help build skills with AR. It appears, you are doing this at the right time. Once the glasses hit main stream, there will be much demand for content and creators.
@dilmerv
4 жыл бұрын
I read a lot of code, I download code and review many frameworks on a consistent basis. I also love to prototype a lot so I do many prototypes on a daily basis. You can find many at github.com/dilmerv
@lando6583
4 жыл бұрын
brilliant video! It was able to implement your example seamlessly.
@dilmerv
4 жыл бұрын
Very cool I am glad you were able to do it ! Good work :)
@MN_JohnnyZ
5 жыл бұрын
Amazing tutorial! I haven't looked through your library yet so maybe you already have one, but a tutorial on how to place a single object instead of multiple and a way to hide the plane indicators once the user is satisfied with their detection would be awesome!
@dilmerv
5 жыл бұрын
Hi Johnny thanks for the suggestion and yes I have one video where I show how to place one but I don’t have one on hiding the planes which I love the idea ! I will post one this week :)
@MN_JohnnyZ
5 жыл бұрын
@@dilmerv You, sir, are a boss!
@siddhantchd
5 жыл бұрын
@@dilmerv could you please link me to the videos for both of these ... thanks a lot ... great videos for a newbie like me
@Dweeh
3 жыл бұрын
If you are not able to add the PlacementController script to ARSessionOrigin - add the namespace UnityEngine.XR.ARFoundation to the script first. ( using UnityEngine.XR.ARFoundation; ).
@fedor_U
2 жыл бұрын
Sorry, to what script I should ad this?
@AnshMehraa
4 жыл бұрын
There is no AR Session in my XR menu. It has all kinds of interactors but no AR Session :( PS - is this the first video of your series? because my Unity Scene had a landscape canvas while yours is a portrait canvas. To see the XR Toolkit you must enable Preview Packages under the Advanced dropdown thats a checkbox "Show Preview Packages"
@dilmerv
4 жыл бұрын
Hello what version of Unity are you using also AR Foundation version? I believe you may be looking at a newer version.
@UjjwalDubey1994
3 жыл бұрын
Thank you!
@dilmerv
3 жыл бұрын
You are welcome !
@ramezmagdy145
3 жыл бұрын
Hi Dilmer!, loved your tutorial and how it covers tech that's new to Unity. I was wondering if there's any way to run the code on Unity without exporting it, to figure out what exactly is happening in the scene.
@rajsalagre5443
4 жыл бұрын
Hey thanks for the tutorial. Can we create our own plane by selecting some points in real world( like measuring tape) and then that selected area becomes a trackable surface. Would appreciate your help in this. Thanks.
@haseebasif3233
5 жыл бұрын
Great. It nice. But kindly do made some complex tutorials
@dilmerv
5 жыл бұрын
Thanks for the feedback, what kind of tutorials ? Can you tell me more specific details ?
@victorchelemu182
4 жыл бұрын
Amazing tutorial. You explain this stuff in such an approachable way. Still earning coding but am able to the logic. Such an inspiration. How would i restrict the code to only place on object rather than every time i touch the screen? Newbie question i know, bear with me... :-)
@manuelaashd4515
3 жыл бұрын
I was wondering the same thing! Did you find an answer?
@shalsa07
3 жыл бұрын
@@manuelaashd4515 Hi bro. Nothing yet bro. Still waiting for response...
@3urobob
4 жыл бұрын
Thanks for this tutorial! I followed everything exactly, but when I launch the app on my phone there is no plane detection :/ Sometimes I get a buggy line/plane thing on the very bottom of the screen, but it's not tracking anything in the real world Using an iPhone X, iOS 13.4 Xcode 11.4 Unity 2019.3.8f1
@dilmerv
4 жыл бұрын
Thanks for the feedback and what device do you have ?
@techlabssophia1135
4 жыл бұрын
@@dilmerv Same for me with Nokia 6.1
@sanky369
2 жыл бұрын
I am getting pink planes on following this tutorial. How to resolve this issue?
@Chema5000
5 жыл бұрын
Great tutorial! Thanks! Can be modified to work on android? I've tried but it doesn't detect any plane...
@dilmerv
5 жыл бұрын
I haven’t tested it in Android but I am sure it can be modified to do so, I should be getting Android devices soon since many people have asked me that question. Thanks again for the feedback !
@Chema5000
5 жыл бұрын
@@dilmerv Update: it works! it was a mistake on my part...
@aakp3005
3 жыл бұрын
@@Chema5000 Hey long time no see Im on Andriod In the Inspectior in the Placement Controller the PlacedPrefab dosnt show.
@daveeman00
4 жыл бұрын
Great video! What VS Code extensions do you use? Seems I can never get the correct smartSense blend to match your auto-completes. Thanks!
@dilmerv
4 жыл бұрын
Cool man yes I had issues initially, let me compile a list and post it here
@cornoltimariagrazia4456
2 жыл бұрын
Hi Dilmer, I am a programming languages teacher. I must use Oculus go (with Unity) for teaching AR to my student. I am very confused: which version of Unity I have tu use? Can I use Oculus go for VR projects? Which are the very first steps to start with AR/VR?
@christophergraf5929
4 жыл бұрын
Hey Dilmer. Great tutorial, but I am having a little trouble. I believe I followed everything correctly, but when I put the app on my iPad and run it, I just get a black screen. I am using Unity 2019.3.0b3, Xcode 11.2.1, and an iPad Air 2 with iOS 13.2.2.
@dilmerv
4 жыл бұрын
Hey Christopher thanks for watching, are you building your own project or are you using my GitHub repo ?
@christophergraf5929
4 жыл бұрын
@@dilmerv I just made a new project and started my own
@christophergraf5929
4 жыл бұрын
@@dilmerv Is there a step I am missing by not using your GitHub repo? I would really like to continue going through your AR videos
@dilmerv
4 жыл бұрын
@@christophergraf5929 more likely is an issue with the version or device, try using 2019.2.2f1 for now until I make a video on using 2019.3 :)
@TheGladScientist
4 жыл бұрын
@@dilmerv any update on using it with 2019.3? i built it and get splash screen but then just blackmirror mode lol. maybe it's not getting camera access or something?
@fedor_U
2 жыл бұрын
Hi. I see no "Placement controller" among Unity components. Using AR Template with Unity 2021.1.22f1 and AR Foundation latest 4.2.0 Please advise whether this Placement Controller was deprecated or I need some more additional setup?
@fedor_U
2 жыл бұрын
Answering my own dumb question. During initial steps it may seem that "PlacementController" is either built-in or preinstalled but it is not. Just following the video along I realised that this is the script we are going to create. This is what this video is all about. But! If you are like me using the latest Unity version then you can just create a new project with the latest Unity AR template. This way in the 'ExampleAssets/Scripts' folder you will find the 'AnchorCreator' C# script which is basically doing the same thing as "PlacementController". Actually it will be even better as the latter uses proper naming ("Anchor" instead of "Placement") and the robust "ARAnchorManager" helper class that will do some additional management of all placed Anchors. Enjoy!
@Ben-rz1qx
2 жыл бұрын
@@fedor_U not a dumb question at all, these are important questions that can light the bulb in your brain and give you a more deep understanding to unity and the AR template,
@AndreasKurz
4 жыл бұрын
first time I ever had to do something with the pose in interaction with ARraycast. As far as I understood it, the raycast is sent by the camera? It detects the plane (fe floor) and... gets a pose from this hit?
@dilmerv
4 жыл бұрын
Yes that's correct, the floor is a plane which in the same sense is a "Trackable" component. The hit is correct is the "out" object resulting in the hit between the ray and the floor.
@ab_obada5012
Жыл бұрын
You didn't set a tutorial of how to set a resolution or adjusting the frame of app and + setup
@dilmerv
Жыл бұрын
There is a variety of videos about this in the channel. To adjust the frame rate: docs.unity3d.com/ScriptReference/Application-targetFrameRate.html
@JafferArshad
Жыл бұрын
Hi, I am using AR Foundation's image targets. When it is tracked, an empty gameObject with a script is created. This script instantiates another gameObject containing the rest of the scene (characters, tables, ...). The reason I'm doing it this way is because once the image is tracked we don't want the models to be linked to it (so that if we stopped looking at the image, the models won't start jittering). When we instantiate the models this way their rotation is towards the AR camera's start position. Even if we set the rotation of the objects to zero, they still face the AR camera's start position. Is the problem with the way we approach instantiating the scene objects if so what is the correct way we should approach this issue? Thanks in advance.
@devantamot9259
5 жыл бұрын
Any tips on increasing the success rate of vertical plane detection? The plane detection component seems to have a hard time detecting walls for me. Also, are reflective surfaces a no go for wall detection? (such as TV screens and mirrors and what not)
@devantamot9259
5 жыл бұрын
I'm using a OnePlus 5T A5010 with a 16 + 20 MP Dual Camera if that helps with the diagnostics
@dilmerv
5 жыл бұрын
What time of the day it is when you are running the experience ? Are there enough lights ? Have you tried setting the detection to everything instead of just one direction ?
@manuelaashd4515
3 жыл бұрын
This was very helpful! I have one question, how do I stop the object from spawning every time I touch the screen? I want it to appear only once. Do I need to add something to the script?
@vanilla-plus
3 жыл бұрын
Hey! I know this is two weeks old so you've probably already gotten it... but change TryGetTouchPosition to the following and it'll only happen once each time your first touch 'starts'. bool TryGetTouchPosition(out Vector2 touchPosition) { if (Input.touchCount > 0) { var touch = Input.GetTouch(0); if (touch.phase == TouchPhase.Began) { touchPosition = touch.position; return true; } } touchPosition = default; return false; }
@manuelaashd4515
3 жыл бұрын
@@vanilla-plus I didn't actually, thank you so much for replying! I tried this but it still apears at every touch.. Here's the whole code, maybe you could check if you can find what's wrong? using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.XR.ARFoundation; [RequireComponent(typeof(ARRaycastManager))] public class PlacementController : MonoBehaviour { [SerializeField] private GameObject placedPrefab; public GameObject PlacedPrefab { get { return placedPrefab; } set { placedPrefab = value; } } private ARRaycastManager arRaycastManager; void Awake() { arRaycastManager = GetComponent(); } bool TryGetTouchPosition(out Vector2 touchPosition) { if (Input.touchCount > 0) { var touch = Input.GetTouch(0); if (touch.phase == TouchPhase.Began) { touchPosition = touch.position; return true; } } touchPosition = default; return false; } void Update() { if(!TryGetTouchPosition(out Vector2 touchPosition)) return; if(arRaycastManager.Raycast(touchPosition, hits, UnityEngine.XR.ARSubsystems.TrackableType.PlaneWithinPolygon)) { var hitPose = hits[0].pose; Instantiate(placedPrefab, hitPose.position, hitPose.rotation); } } static List hits = new List(); }
@vanilla-plus
3 жыл бұрын
@@manuelaashd4515 Hey, sorry for the late reply, I've just had a quick experiment with your code. I think it could be a few things. First is to make sure theres an AR Plane Manager component on your AR Session Origin GameObject and make sure it has an AR Plane prefab to instantiate. You might have this already, but just thought I'd check. This component detects and creates the surfaces for your tap rays to land on. Second is to make sure that script you pasted is attached to the AR Session Origin GameObject as well. I see that you're getting it to create the AR Raycast Manager automatically, which is awesome, but I think that component only works if its on the Session Origin. Finally, you don't actually give the script a GameObject to instantiate :p placedPrefab is the reference you would use to refer to the object you've already created, so when your app starts it will be empty or 'null'. So on line 59, you're saying "Instantiate(nothing)". This slightly different version should work now (I tested it on my end, seems to work!), just make sure to put a GameObject reference into "thingToInstantiate" in the Editor. using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.XR.ARFoundation; [RequireComponent(typeof(ARRaycastManager))] public class PlacementController : MonoBehaviour { public GameObject thingToInstantiate; [SerializeField] private GameObject placedPrefab; public GameObject PlacedPrefab { get { return placedPrefab; } set { placedPrefab = value; } } private ARRaycastManager arRaycastManager; void Awake() { arRaycastManager = GetComponent(); } bool TryGetTouchPosition(out Vector2 touchPosition) { if (Input.touchCount > 0) { var touch = Input.GetTouch(0); if (touch.phase == TouchPhase.Began) { touchPosition = touch.position; return true; } } touchPosition = default; return false; } void Update() { if (!TryGetTouchPosition(out Vector2 touchPosition)) return; if (arRaycastManager.Raycast(touchPosition, hits, UnityEngine.XR.ARSubsystems.TrackableType.PlaneWithinPolygon)) { var hitPose = hits[0].pose; PlacedPrefab = Instantiate(thingToInstantiate, hitPose.position, hitPose.rotation); } } static List hits = new List(); }
@manuelaashd4515
3 жыл бұрын
@@vanilla-plus Thank you so much for taking the time to help! Luckily, I'm having someone look into it directly soon so I won't be bothering you in the comments anymore :D Again, thank you so so much for your effort, I really appreciate it. Good luck with your projects!
@brianfbatista
5 жыл бұрын
Hey Dilmer! First of all, amazing tutorial (and tutorial list). I'm following through the ARKit / Unity / ARFoundation tutorials, and overall having an easy enough time following them and remaking the same things you have produced. I'm just running into one minor stump, and not sure what to do. When I launch the project and I look through the phone, the polygon that is creating the Plane has a pink filling in it, which usually indicates that the mesh is missing its material/texture. Now, I went back to the AR Plane Visualizer and tried messing around with the Line Renderer and the Material we assign to it, but that also didn't work (still pink). I even made the material transparent and also created a new material (setting it to opaque and white-colored), to see if any of those would change something, but the Plane Visualizer kept producing a pink "fill" for the plane. Any chance you could help me out with this? I'm willing to send over my project for help. Thank you!
@dilmerv
5 жыл бұрын
Yes I know the issue, in the AR Plane Visualizer go to the Mesh Renderer component > click on Materials > then assign the material you desired, more likely the material you have has an issue with a shader or the pipeline selected, do that and it should fix the pink problem. Thanks for your feedback as well I appreciated !
@brianfbatista
5 жыл бұрын
@@dilmerv Ah I see. I'll try that and get back to you. Thanks for the quick reply!
@dilmerv
5 жыл бұрын
@@brianfbatista You are welcome Brian thank you for your time !
@mahendran671
4 жыл бұрын
what happens if i give rigidbody component to that sphere prefab does it fall or it will hit AR Plane
@dilmerv
4 жыл бұрын
Try it ;)
@mahendran671
4 жыл бұрын
@@dilmerv i tried its falling down but i dont want that please help me
@prathameshrajput3453
4 жыл бұрын
Is it possible to identify ceilings or slanted surfaces using AR foundation?
@dilmerv
4 жыл бұрын
With plane detection and some math I am sure you can accomplish it.
@anonanon195
4 жыл бұрын
Oh my God!
@dilmerv
4 жыл бұрын
I hope this is a good “oh my god” hehe have a great day and thank for watching
@hassanhameed7223
5 жыл бұрын
Awesome tutorial and it works but the plane it detects shows a bright purple color instead of the grey color yours is showing. It doesn't affect anything, its just ugly. But any idea why this could be?
@dilmerv
5 жыл бұрын
Yes that’s probably because the line renderer on the prefab doesn’t have a material assigned, check the line renderer material and make sure there is one assigned :)
@StGlaciers
4 жыл бұрын
Hey, I can't find the source code on patreon after joining, can you help? Where is the source code located? Thanks.
@dilmerv
4 жыл бұрын
Hey man thanks for your support, I am going to send it to you in Patreon via DM.
@aakp3005
3 жыл бұрын
Hello im on a school procject. When ive followed the turtorial in the end the PlacedPrefab obtion dont show in the controller. can it be bacause im using Android?
@aakp3005
3 жыл бұрын
In unity it says i have to fix the compiller errors but in the visual studio it says there isnt any mistakes. ive just written the same script as you
@rihabbelhiba5851
4 жыл бұрын
RaycastManager could not be found i'm using a AR foundation 3.0 also for arkit arcore how can i fix it
@dilmerv
4 жыл бұрын
What version of Unity are you using ?
@rihabbelhiba5851
4 жыл бұрын
@@dilmerv 2019.2
@seunghuncho3058
4 жыл бұрын
Is there a way to run the app without exporting XCode project? I’m wondering if there’s remote dev environment
@dilmerv
4 жыл бұрын
Seunghun Cho currently there isn’t a way, the only way I was able to get more debug info is by using a runtime hierarchy and inspector from the asset store. Unity is working on a remote option and I will announce it in the channel once it is available :)
@seunghuncho3058
4 жыл бұрын
@@dilmerv Thank you Dilmer, please announce us when remote option becomes available from Unity. :)
@dilmerv
4 жыл бұрын
I will thank you 🙏
@sathvikreddy1407
2 жыл бұрын
its the same with PC and android right?
@onuryldrm6845
4 жыл бұрын
niceee
@dilmerv
4 жыл бұрын
Thank you 😊
@angelwang945
4 жыл бұрын
Thanks for the video! I've tried and uploaded on my iPhone successfully. But when I open the APP only show broken textures purple. I don't know how to fix. Wants to ask if somebody has the same problem. Thanks My vision : Unity 2019.2.6f1 Personal Xcode 11.0(11A420a) iPhone XS
@dilmerv
4 жыл бұрын
Look at the line renderer material assigned to the visualizer prefab and you will need to assign a material, more likely this is missing the inspector connection.
@angelwang945
4 жыл бұрын
@@dilmerv Your reply is so fast! Amazing! In my Line Renderer Materials: Size:1 Element 0: Default-Line Is that wrong?
@dilmerv
4 жыл бұрын
When you look at the material does It look purple in the material preview ?
@angelwang945
4 жыл бұрын
@@dilmerv In the preview it was white. But in now the unity crash again and again... Even just opening the prefabs file can be crashed. :(( Thank you for helping!! QQ
@angelwang945
4 жыл бұрын
I had tried again. Only load AR session \ AR session Origin(change the AR camera to be the Main Camera) \ Cube. Purple Again :((((( I think it was setting or something about the environment. I have no idea where might be. Still, love your video and want to try it!
@georgepapoutsas5198
3 жыл бұрын
I followed the tutorial step by step and it's not working in ARcore using unity 2020.3.7f1 with ARcore 4.1.7. The plane detection somewhat works but it's very slow and very inaccurate. The object does not show when tapping. Can someone help?
@dilmerv
3 жыл бұрын
Try the examples in this repository and test it with the same device github.com/Unity-Technologies/arfoundation-samples
@georgepapoutsas5198
3 жыл бұрын
@@dilmerv I ran an Image Tracking scene on my OnePlus Nord N10 5g and it did not work but I also ran it on my sister's galaxy S9 and it worked
@dilmerv
3 жыл бұрын
If it doesn’t work on specific devices that may just be the device capabilities, look into ARCore specs to find out what devices supported.
@georgepapoutsas5198
3 жыл бұрын
@@dilmervAnyways, thank you for the tutorials, you really are one of the few who do this type of stuff.
@limitlessvisuals5368
3 жыл бұрын
Hey Dilmer, I have done this yet the code shows huge errors. I was wondering if I subscribe and pay for your channel will this allow me to have access to you and ask you questions? thank you.
@dilmerv
3 жыл бұрын
Thanks for your message, email me and I will help you out, look at my contact info, thank you
@UXElnaz
4 жыл бұрын
This videos suppose to be for beginners! I don't understand the coding part!!! :(
@yuxi8944
Жыл бұрын
it‘s not friendly tutorial for beginner,can you make it clear? you always go back and modify your code, why you can't finish it at once?
@dilmerv
Жыл бұрын
Thanks for your feedback, this was one of my early tutorials which I plan to re-make completely with the latest version of AR Foundation starting January 2023.
@anonimbai
5 жыл бұрын
Hi, do yo know how to detect a face and put a mask, like a Snapchat Filter. Do you have any tip? :)
@dilmerv
5 жыл бұрын
FaceTracking gives you what you need, watch the previous videos on this series where I do face detection, you can also get blend shape locations and use those positions to calculate the placement of your mask.
@anonimbai
5 жыл бұрын
@@dilmerv my android device is not compatible with AR Core :( so ARFoundation does not help me
@dilmerv
5 жыл бұрын
That’s bad to hear !
@anonimbai
5 жыл бұрын
@@dilmerv it's ok man, I fix this from here :) www.xzimg.com/Docs
@adrianalcomendras6754
4 жыл бұрын
do these tutorials work on android?
@dilmerv
4 жыл бұрын
Some of them do and it really depends on which features are taught in the video, some features are only iOS specific and some work with ARCore as well.
Пікірлер: 117