No video

Unity Augmented Reality Tutorial Lesson 03 - Interactive Clickable Objects

  Рет қаралды 5,990

lightsandclockwork

lightsandclockwork

Күн бұрын

Unity Augmented Reality Tutorial Lesson 03
Interactive Clickable Objects
Needed Packages
com.unity.xr.arfoundation 5.0.7
com.unity.xr.arcore 5.0.7
Code:
github.com/Tem...

Пікірлер: 19
@garybeattie3903
@garybeattie3903 6 ай бұрын
Many thanks for these tutorials - they're excellent and very easy to follow - I'm presently working on developing an AR scavenger hunt as my dissertation subject and these are the most useful and educational set of tutorials I have found so far. incidentally I simply rotated both my Earth and Mars info images 180° using the Photos app in Windows and when I re-ran the scene, the prefabs updated automatically without my having to delete and recreate anything - is this OK to do it like this or might it cause me any issues later on?
@lightsandclockwork
@lightsandclockwork 6 ай бұрын
You welcome. Excellent on the dissertation :) You will have to try and send me screenshots or link to any videos so i can see it in use :) I tried to do a Unity AR GPS based treasure hunt a few years ago, but i couldnt get the 'Maths' to work in time for the deadline i had. I wanted it for my class for their college induction day. Yes, it is absolutely fine to edit the source files, that is my usual method. I go back to photoshop/blender to fix the origin, rotation and scale of files.
@liorakeller283
@liorakeller283 4 ай бұрын
Thanks!!
@user-cv2dp6xj1i
@user-cv2dp6xj1i 11 ай бұрын
hi sir. can you make a tutorial that if we grab an object, in canvas showing description about the object
@lightsandclockwork
@lightsandclockwork 11 ай бұрын
Yes, good idea, i'll see if i can fit it in over the weekend.
@nullzero3455
@nullzero3455 3 ай бұрын
hello sir, what can I do so that I can only have one info popup at a time? Like when I click mars multiple times it can only spawn one marsInfo gameObject
@lightsandclockwork
@lightsandclockwork 3 ай бұрын
Hi, Basically you will will need to add a boolean variable. Start as false, only spawn if false and then set to true when spawning for the first time.
@Renn2802
@Renn2802 7 ай бұрын
Hello, sir. Can you help me? Is there a way to make when we clicked on the object, the object appear bigger along with the info? And when clicked on the close button, it will shrink back. Please answer
@lightsandclockwork
@lightsandclockwork 7 ай бұрын
Yes, this should not be too difficult, i shall try and post an answer as soon as possible. (are you one of my actual/in class students?)
@lightsandclockwork
@lightsandclockwork 7 ай бұрын
To help get you started. if(hit.transform.tag=="ET")//Your tagged object { float scale = 1.5f; //move to somewhere more useful i.e. global? hit.transform.localScale = new Vector3(scale, scale, scale); //ToDo: add a variable to keep track of which item is scaled up and scale down when ready }
@lightsandclockwork
@lightsandclockwork 7 ай бұрын
Update: Now with scale down when click on another object. if(hit.transform.tag=="ET")//Your tagged object { float scale = 1.5f; //move to somewhere more useful i.e. global? hit.transform.localScale = new Vector3(scale, scale, scale); //ToDo: add a variable to keep track of which item is scaled up and scale down when ready } else { float scale = 1.0f; //Could store original scale in a variable/structure/class GameObject temp = GameObject.FindGameObjectWithTag("ET"); temp.transform.localScale = new Vector3(scale, scale, scale); }
@Renn2802
@Renn2802 7 ай бұрын
@@lightsandclockwork I just realize I sounds rude saying "Please answer", forgive me! And I'm not your student, just random student who currently making AR. I'm still not used to Unity 3D. I will try using this code first and will update if it works or not. Thanks!
@lightsandclockwork
@lightsandclockwork 7 ай бұрын
No apologies or forgiveness required. I do ask for suggested content. A lot of my AR VR videos have come from my actual/real world classes. I only asked if you were one of my students because if so i would have gone over it in class that day. Easier in person.
@prabhakarjoshi864
@prabhakarjoshi864 6 ай бұрын
clicks are being registered upon clicking on the game screen but i cant click on my objects(earth mars in your case), it gets registered as a normal primary button click, can you please help?
@lightsandclockwork
@lightsandclockwork 6 ай бұрын
Common mistakes are... Not having a box collider on the object you want to click on. Box collider not the size you need or even not in the right place. Your Object with hitbox not tagged. Tag spelt differently to how you spell it in the code i.e. 'earth' 'Earth'
@prabhakarjoshi864
@prabhakarjoshi864 6 ай бұрын
@@lightsandclockwork oh god, i was so silly, completely slipped my mind that we have a collider too, that was the problem indeed, thanks alot for the help, it has happened to me multiple times before
@lightsandclockwork
@lightsandclockwork 6 ай бұрын
I am glad it was something simple.
Unity AR - Augmented Reality Tutorial Lesson 04 - Canvas UI
12:49
lightsandclockwork
Рет қаралды 5 М.
The Most Impressive Scratch Projects
11:00
DenshiVideo
Рет қаралды 4,9 МЛН
The FASTEST way to PASS SNACKS! #shorts #mingweirocks
00:36
mingweirocks
Рет қаралды 12 МЛН
At the end of the video, deadpool did this #harleyquinn #deadpool3 #wolverin #shorts
00:15
Anastasyia Prichinina. Actress. Cosplayer.
Рет қаралды 15 МЛН
Augmented Reality Tutorial | Gaze Interaction in Unity
17:18
Third Aurora
Рет қаралды 63 М.
The Ultimate Introduction to Scriptable Objects in Unity
20:45
Getting Started With ARFoundation in Unity (ARKit, ARCore)
31:20
The Unity Workbench
Рет қаралды 459 М.
Can AI code Flappy Bird? Watch ChatGPT try
7:26
candlesan
Рет қаралды 9 МЛН
Why Does Diffusion Work Better than Auto-Regression?
20:18
Algorithmic Simplicity
Рет қаралды 301 М.
Unity Augmented Reality Tutorial Lesson 01 - AR Simulation
15:57
lightsandclockwork
Рет қаралды 21 М.