Rotate and Scale AR Object using Sliders - Unity 2020

  Рет қаралды 13,430

Mohd Hamza

Mohd Hamza

3 жыл бұрын

In this video we will see how to control an AR object using Sliders.
This video is an extension of my previous video. You can find the video through the link: • Beginners guide to UNI...
We will control the rotation and scale of the AR object using Sliders.
The script can also be used for Non - AR projects.
ScaleAndRotateSlider Script link: docs.google.com/document/d/16...
I will keep adding functionalities to this project.
Support here: tinyurl.com/a8zdzmp5
Discord server invite: / discord
Hit a like button if you like my work, comment if you have any feedback/suggestions. Subscribe for more content coming every week.
Thank you!

Пікірлер: 43
@arjunmenon3817
@arjunmenon3817 3 жыл бұрын
bro this is just crazy manh one of the best tutorials i have ever seen on AR Foundation
@MohdHamza
@MohdHamza 3 жыл бұрын
Really appreciate your comment!
@vanshrana9508
@vanshrana9508 Жыл бұрын
Thanks a lot man this was a huge help :D
@mehulanshumali
@mehulanshumali 3 жыл бұрын
Great Work buddy ... Love this tutorial series ......
@MohdHamza
@MohdHamza 3 жыл бұрын
Thanks bud!
@hazrathamza25
@hazrathamza25 Жыл бұрын
You are Great Hamza :)
@user-ub3ld9cd8v
@user-ub3ld9cd8v 3 жыл бұрын
정말 많은 도움이 되는 강의입니다. 감사합니다.
@MohdHamza
@MohdHamza 3 жыл бұрын
감사합니다
@eshansingh4034
@eshansingh4034 3 жыл бұрын
Hey just one suggestion for your future videos, please be a little louder, even in the previous video I had trouble with the volume level. Thanks for the tutorials.
@anajito2023
@anajito2023 3 жыл бұрын
Thank you very much
@ajaysagar25
@ajaysagar25 3 жыл бұрын
great work Dost.
@MohdHamza
@MohdHamza 3 жыл бұрын
Thanks😀
@bernardo1922
@bernardo1922 2 жыл бұрын
Thanks man
@samilaferreira5658
@samilaferreira5658 2 жыл бұрын
Thank you so much. I'm working with Vuforia and it's worked only for a single 3d object. I have 3 in my scene and also I have a video player. If I place the sliders canvas under ARCamera, the sliders will show up in front the video playing as well. Someone could help please?
@arappsbbb9233
@arappsbbb9233 2 жыл бұрын
May I know how to change the pivot of the rotation axis?
@ruhaena9708
@ruhaena9708 Жыл бұрын
This is really helpful! Anyway what if i wanna make slider for rotate Y and rotate X seperately? Is it the same methode? What part of code i need to change?? This is my last step to complete my project>
@zoel2000
@zoel2000 2 жыл бұрын
how about to make rotate slider, for rotating horizontal object to vertical object?
@nazirajsmn4280
@nazirajsmn4280 2 жыл бұрын
Hi. can you help me. I want to scale the object by option buttons such as button size object of 0.5 or back to normal size 1.0.
@asyrafabuzar8211
@asyrafabuzar8211 Жыл бұрын
hye can i know why i get the error of CS0029 Cannot implicitly convert type 'float' to 'UnityEngine.UI.Slider' and when I change the 'float' to 'UnityEngine.UI.Slider' the output in add component is not same as the video.
@amaniwebber-schultz1796
@amaniwebber-schultz1796 Жыл бұрын
This was so helpful!! I am trying to figure out how to do this with position. I was able to modify it so it changes the XY position, but the slider won't move it back and form between minY and maxY. Have any advice? My current code is: void Start() { positionSlider = GameObject.Find("RBCSlider").GetComponent(); positionSlider.minValue = positionMinValue; positionSlider.maxValue = positionMaxValue; positionSlider.onValueChanged.AddListener(RBCSliderUpdate); } void RBCSliderUpdate(float value) { transform.localPosition = new Vector3(299, 172, -237); } }
@user-we6si4mi3x
@user-we6si4mi3x 3 жыл бұрын
cool lesson, thanks a lot! and if I want to scale with two fingers, what should my code look like? thanks in advance
@MohdHamza
@MohdHamza 3 жыл бұрын
Check kzbin.info/www/bejne/oJi0h4iqqaqBiqs or kzbin.info/www/bejne/f4Sleqhsf9-ZoZo whichever suits your needs.
@KangGadget
@KangGadget 3 жыл бұрын
thanks man, this is a good tutorials, but this is worl with vuforia? or just for ARfoundation?
@MohdHamza
@MohdHamza 3 жыл бұрын
Thanks 😊 This one is using AR Foundation.
@shaoryaraj5267
@shaoryaraj5267 2 жыл бұрын
Thanks. Great video. I want to add a button to remove all instances of the spawned object displayed on the screen. How do I do that? I can spawn multiple objects on the screen, but want to delete them all.
@MohdHamza
@MohdHamza 2 жыл бұрын
Hi Shaorya, You could do something like GameObject enemy = GameObject.FindGameObjectWithTag("Spider"); Destroy(enemy); Assuming you have added tags on the spider.
@Slu2112
@Slu2112 3 жыл бұрын
please man I've been searching all over can u help me with a way to use only one slider for both rotation and movement with diferent value?
@MohdHamza
@MohdHamza 3 жыл бұрын
You could do that but I don't understand why would you do that, min and max value would be different for scaling and rotating. Try replacing rotateSlider = GameObject.Find("RotateSlider").GetComponent(); with rotateSlider = GameObject.Find("ScaleSlider").GetComponent(); manipulate the max and min values because that will be in degrees. That should target the scale slider, for both jobs. I wouldn’t recommend it though unless you are clear how you'll convert scale value in degrees!
@manutm4uu
@manutm4uu 2 жыл бұрын
Scaling is working fine, but rotation is not working
@tylerdillman6402
@tylerdillman6402 2 жыл бұрын
Is this possible to do without code?
@MohdHamza
@MohdHamza 2 жыл бұрын
Check this out: kzbin.info/www/bejne/oJi0h4iqqaqBiqs
@bian4553
@bian4553 2 жыл бұрын
did anyone know, i copy & paste the script, and have problem in rotate, it doesn't work, anyone know how to solve this?
@profedavidcarrillo2126
@profedavidcarrillo2126 2 жыл бұрын
same problem
@zeoverse
@zeoverse Жыл бұрын
@@profedavidcarrillo2126 same - any fix?
@raysondsouza3218
@raysondsouza3218 2 жыл бұрын
How to rotate and scale a selected object if there are multiple objects in scene
@MohdHamza
@MohdHamza 2 жыл бұрын
Try this kzbin.info/www/bejne/oJi0h4iqqaqBiqs
@raysondsouza3218
@raysondsouza3218 2 жыл бұрын
@@MohdHamza I tried dis bt it seems all objects scale rotate or move if i move only one object. I want only scale the object i select individually
@MohdHamza
@MohdHamza 2 жыл бұрын
@@raysondsouza3218 If you come to my discord server (link in description), I have explained how to individually control gameobjects.
@kyawzinhtun1789
@kyawzinhtun1789 2 жыл бұрын
Can slider put in world instead of on the screen?
@MohdHamza
@MohdHamza 2 жыл бұрын
Make the slider canvas in world space, should do the job!
@kyawzinhtun1789
@kyawzinhtun1789 2 жыл бұрын
@@MohdHamza yeah but i want to stick the spider with slider I cant spawn ui element. any tips bro!
@MohdHamza
@MohdHamza 2 жыл бұрын
@@kyawzinhtun1789 The slider UI needs to be a child inside the prefab you are spawning. Did you try that? You can post screenshots or media files on my discord server if you can't explain here. The invite link is in the description.
@kyawzinhtun1789
@kyawzinhtun1789 2 жыл бұрын
@@MohdHamza yeah thats work! thanks man I am beginner in C# & Unity I can only spawn object and i have no idea How to interact UI slider after spawning in the AR World. I think some coding needed to do raycast mgr to work in ar world. Still waiting other tutorials.
UI Slider - Unity Official Tutorials
8:10
Unity
Рет қаралды 77 М.
ПРОВЕРИЛ АРБУЗЫ #shorts
00:34
Паша Осадчий
Рет қаралды 6 МЛН
Эффект Карбонаро и нестандартная коробка
01:00
История одного вокалиста
Рет қаралды 9 МЛН
路飞被小孩吓到了#海贼王#路飞
00:41
路飞与唐舞桐
Рет қаралды 77 МЛН
Я нашел кто меня пранкует!
00:51
Аришнев
Рет қаралды 5 МЛН
Augmented Reality Tutorial | Gaze Interaction in Unity
17:18
Third Aurora
Рет қаралды 62 М.
How Animate UI BUTTONS in Unity (Easiest Way)
7:53
BudGames
Рет қаралды 18 М.
Unity AR Tutorial:  AR Raycast - place an object mutiple times
6:34
SoomeenHahm Design
Рет қаралды 7 М.
Unity Change Scene With Button - EASIEST Method
6:09
Unitips
Рет қаралды 25 М.
How To Scale Move Rotate Object Using Lean Touch With Unity 2017.3
4:21
Denys Gamers Tutorial
Рет қаралды 69 М.
ПРОВЕРИЛ АРБУЗЫ #shorts
00:34
Паша Осадчий
Рет қаралды 6 МЛН