WATCH NEXT: Coding games alone is cool, but you know what's even better? Coding with the help of the OPEN SOURCE community! Learn all the benefits here: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-uquIcISFtwg.html it's free!
Hello and welcome to the channel! That's indeed a valid question :) You can also use a Tag and things works perfectly. In this case I did that in preparation of the additional features I described in part 2 of the tutorial. You can give it a look on my channel ;)
Welcome to my channel! That's great to hear you enjoyed the video! If you're into mobile Dame Dev you should have a look at my video on mistakes in my mobile game, maybe you have some suggestions :P
i get error when i write line 14 in your code: DragController[ ] controller = FindObjectOfType(); the erros is because the array you make and set it into a script which is not an array, what do i miss in the video?
it works sort of. Only when I swipe the object fast to the red slot. It lerps back to previous position. Otherwise it just moves to the red slot when I move with my finger.
I had to adjust two things. First, the size of my collider. It's not obvious, and probably not part of this content, but the default collider size is too small to trigger anything. Second, in Drag() the Vector2 was setting z to 0.0. In this case you need to use a Vector3 and set z to something like lastDraggedTransform.position.z. You can check the z of your gameObject.transform, but frequently it is not 0.
In a project made with NGUI, I needed a function to move an object by touch, so I tried to get help, but Raycast hit does not hit at all. I need advice. thank you.
Sorry. I asked a question and thought about it, so I solved it. It was a simple problem that was not recognized well because the size of the collider was smaller than expected. Thanks, it worked out well. thank you.:)
Hey now someone what is Assets/UI drag.cs(14,10): error CS0246: The type or namespace name `Draggable' could not be found. Are you missing an assembly reference? bycouse i dont know
Hey! Welcome to the channel :) It wasn't strictly required here, but if you're interested in the Singleton pattern I can make a video about it, with pros and cons, and best practices on how to use them. In case you're not subscribed yet, just hit that red button so you're notified when the video will be out.
@@DevLeonardo Hi, I know about singleton pattern, but i think that would be interesting a video explanen "pros and cons, and best practices on how to use them". P.S: Your video really helped me, thanks!. Like and Suscribe
Dang, I'm getting an error: "Assets/Scripts/drag_controller.cs(58,25): error CS0119: 'draggable' is a type, which is not valid in the given context" Any thoughts?
Let's do some networking guys! :) We can get in touch on Twitter: twitter.com/Balastrong If you like reading articles, here's my dev.to profile: dev.to/balastrong If you're more on social networks: www.tiktok.com/@balastrong and instagram.com/devbalastrong/ See you there!