No video

How to activate animations in AR with touch input using Vuforia AR & Unity3D

  Рет қаралды 37,862

CubicBrain

CubicBrain

Күн бұрын

How to activate/start animations in AR with either touch input or keyboard press using Unity3D and Vuforia. Simple touch input on a phone.

Пікірлер: 52
@CubicBrain
@CubicBrain 5 жыл бұрын
using System.Collections; using System.Collections.Generic; using UnityEngine; public class animHDD : MonoBehaviour { public Animator anim; // Use this for initialization void Start () { } // Update is called once per frame void Update () { /* if(Input.GetKeyDown("1") && anim.GetCurrentAnimatorStateInfo(0).IsName("none")) { anim.Play("open"); } else if (Input.GetKeyDown("1") && anim.GetCurrentAnimatorStateInfo(0).IsName("close")) { anim.Play("open"); } else if (Input.GetKeyDown("1") && anim.GetCurrentAnimatorStateInfo(0).IsName("open")) { anim.Play("close"); }*/ for (int i = 0; i
@ashishankit9911
@ashishankit9911 4 жыл бұрын
Thanks
@pauldouglas6931
@pauldouglas6931 6 жыл бұрын
Another brilliant tutorial - thanks!
@CubicBrain
@CubicBrain 6 жыл бұрын
Thanks a lot Paul.
@abdulmajidmyarima418
@abdulmajidmyarima418 4 жыл бұрын
@@CubicBrain good day and nice to meet you can we talk please so that you can assist me am working on AR for my final year project
@aegiswang1
@aegiswang1 5 жыл бұрын
Thank you!! It's very helpful!!
@problemsinspace
@problemsinspace 6 жыл бұрын
These are great videos. Thanks.
@CubicBrain
@CubicBrain 6 жыл бұрын
Thanks a lot.
@davechaffey3493
@davechaffey3493 5 жыл бұрын
Great explanation. Kudos to you!
@CubicBrain
@CubicBrain 5 жыл бұрын
Thanks!
@123456789jameswhite
@123456789jameswhite 5 жыл бұрын
Hey, great video. how would you do this for multiple image targets if you wanted to trigger them independently?
@disconuts315
@disconuts315 11 ай бұрын
I know it's a long shot this video is 5 years old but i can't for the life of me find a way to trigger a sound when the screen is touched, could you help me?
@0099boomerang
@0099boomerang 3 жыл бұрын
Can we use interface slider for triggering and controlling AR object animations?
@leabarrionuevo
@leabarrionuevo 4 жыл бұрын
hi! thanks for your videos, they are amazing. In this moment, i want to do the same but with a touch cube (and reproduce the animation), how do i do it?
@jacobyoung6876
@jacobyoung6876 6 жыл бұрын
Once again, great video! I had always wondered how accessing mobile touch worked. Where did you learn to program for touch? I'm looking to get started using different kinds of touch commands (such as pinch) to scale objects in Vuforia. If you have any advice, please let me know!
@CubicBrain
@CubicBrain 6 жыл бұрын
Hi Jacob, thanks once again for the feedback. I don't have a lot of experience with touch commands, but its actually on my list of future features to build, and make a tutorial about.
5 жыл бұрын
you could create a tutorial so that when you press the screen a video will be put on full screen, thanks
@jagdelhi
@jagdelhi 4 жыл бұрын
Could u suggest some script in unity Vuforia AR, that starts animation onTrackingFound and restart on another time ...
@xc5838
@xc5838 5 жыл бұрын
Thank you so much for posting this video this was exactly what I was looking for. I would also like to ask you a follow-up question. How can you detect a user's touch on a mobile device on a specific part of the 3D model? For example, I only want to play the open animation after pressing the 3rd square from the first row and only play the ending animation on the last square from the last row. Can this be done?
@CubicBrain
@CubicBrain 5 жыл бұрын
Hi Luke, thanks a lot. Sure. I made a video where you use ray-casting to check for collisions with 3D obejcts (and use it as triggers): kzbin.info/www/bejne/nprCfHemeJahsM0
@WBBG1
@WBBG1 6 жыл бұрын
Great Video! Do you have any tips or walkthroughs on how to implement this using the ground plane feature? Currently, if you try to use touch input on a model using ground plane, it just clones the model. Is there a way to interact with ground plane models using touch input? Thanks!
@CubicBrain
@CubicBrain 6 жыл бұрын
Hi Terry, I havn't yet tied the ground plane feature, but I am pretty certain that I will make a video about it in the future.
@miqdadagilamarullah
@miqdadagilamarullah 5 жыл бұрын
How can i export .fbx with texture
@katermurr
@katermurr 4 жыл бұрын
Trying to find a way to combine this script with my Audio clips (with loop). No luck so far. do you have some hints or did anyone already implement this?
@katermurr
@katermurr 4 жыл бұрын
using System.Collections; using System.Collections.Generic; using UnityEngine; public class BowAnim : MonoBehaviour { public Animator anim; AudioSource myAudio; // Use this for initialization void Start () { anim = GetComponent(); } // Update is called once per frame void Update () { /* if(Input.GetKeyDown("1") && anim.GetCurrentAnimatorStateInfo(0).IsName("none")) { anim.Play("jump"); } else if (Input.GetKeyDown("1") && anim.GetCurrentAnimatorStateInfo(0).IsName("idle")) { anim.Play("jump"); } else if (Input.GetKeyDown("1") && anim.GetCurrentAnimatorStateInfo(0).IsName("jump")) { anim.Play("idle"); }*/ for (int i = 0; i
@miqdadagilamarullah
@miqdadagilamarullah 5 жыл бұрын
Is that 3d from blender?
@csellers900
@csellers900 2 жыл бұрын
I'm a bit of a noob inside of unity. Am I missing something? None of the models I import into unity have the Model, Rig, Animation, Materials tabs inside the Inspector window. I can access their animations inside the animator window but the inspector window just shows Tag, Prefab, Transform, and Animator.
@CubicBrain
@CubicBrain 2 жыл бұрын
Your animation might already be set up in the imported model. You seem to be viewing a prefab, and not the actual model. In the video I use an imported FBX file where the animation is stored as a "clip"
@csellers900
@csellers900 2 жыл бұрын
@@CubicBrain It was a rigged/animated game model I bought from sketchfab and imported using their store plugin. It uses separate fbx files for all the animations. At first I thought I was selecting the wrong object in the object tree but none of the underlying layers have those features. Does this mean I have to manually import the fbx and re-setup all the animations inside it?
@CubicBrain
@CubicBrain 2 жыл бұрын
@@csellers900 you might have to. if you can import the FBX with animations in them you should be able to find them in the project folder and just add them to the animation controller of your main object
@csellers900
@csellers900 2 жыл бұрын
@@CubicBrain Thanks for the response! I tried creating a new blank 3D project and did a generic import of the same model but I still don't have those options available so I tried importing other random fbx files that have animations and none of them have that option available in the Inspector tab. I'm at a loss on what's causing this but I'll update if I ever figure it out.
@JoshyHJoshy
@JoshyHJoshy 6 жыл бұрын
Hi there, There are some AR apps around that when you hover the tablet on an engine part, for example, some animation starts playing, for instance how to dismantle that part or how to fix it, as well as instructional text on top of the real object. Is it the same principle as this tutorial, that instead of an image target (marker) a 3D object is recognized and then some animation is played or text is shown? Can Vuforia does this?
@CubicBrain
@CubicBrain 6 жыл бұрын
Hi, it is kind of the same principle, however the shown functionality is only for image targets (flat surface). Vuforia has recently updated, and now support model targets (3D models), however I have yet to test this new feature.
@adithyasathya2578
@adithyasathya2578 6 жыл бұрын
Hey there. I just have a few questions... So I have made an fbx animation from a blender asset that uses virtual button. When it play, some objects in the asset dissapear if you get really close to the object. Is there a way to fix this bug? Also can the touch input in this video be paired to a on-screen button? And is there a tutorial for that. I would likd to also request a video on UI in an AR app? Thank you so much.
@CubicBrain
@CubicBrain 6 жыл бұрын
Hi, Regarding the distance of the object to the ARCamera, you should be able to fix this by changing the "Clipping Planes" for the camera in the settings for it inside the inspector. The simple touch input in this tutorial is only for one animation or function at a time, as it only checks if the screen has been touched. If you want a UI and/or button you will have to use ray casting. I am currently planing a tutorial with simple touchscreen UI and ray casting, but I haven't recorded it yet.
@adithyasathya2578
@adithyasathya2578 6 жыл бұрын
CubicBrain Thank you! I tries to build the app to test it on my surface pro pc, but after the Unity logo, the app is just a black screen. It doesn't ask for camera permission. How do I fix this?
@CubicBrain
@CubicBrain 6 жыл бұрын
Hi, I don't know if the Surface pro webcam driver is supported in Vuforia. You might want to ask their tech support or forum at their site.
@emporato
@emporato 6 жыл бұрын
Could you give us the text content of the script or the script file itself...? I am kind of new at unity... thanks in advance
@CubicBrain
@CubicBrain 5 жыл бұрын
sure, its now pinned to the top.
@munzimukhtar763
@munzimukhtar763 6 жыл бұрын
i get n error line under IsName , i dont know why
@CubicBrain
@CubicBrain 6 жыл бұрын
Hi Munzi, could you be a bit more specific? what does the console say?
@rebekahbottjen7816
@rebekahbottjen7816 4 жыл бұрын
For some reason this is not working in my project.
@CubicBrain
@CubicBrain 4 жыл бұрын
Make sure, that the Spelling and case of the animation name is correct.
@jonhgcan4398
@jonhgcan4398 6 жыл бұрын
How can i use multiple VirtualButtons to play an animation? So far i got to work only 1 button. Is a simple exercise of jump,atk and block on a 3d mode.. Anyone have a documentation for the virtual buttons or an idea of how to manage them in code?
@CubicBrain
@CubicBrain 6 жыл бұрын
Hi John, in my video about virtual buttons you can just add more gameobject variables in the code, or set up an array of buttons. kzbin.info/www/bejne/e53Qq3yna9inhKs&lc=Ugx4ULl8UPIbRMfDay14AaABAg it this what you are looking for?
@jonhgcan4398
@jonhgcan4398 6 жыл бұрын
yeah,Thanks!!! :D with that video i made my button but could not figure how to control more buttons to do trigger differents animation depending on wich was "pressed", somewhat a mix between both videos.
@CubicBrain
@CubicBrain 6 жыл бұрын
If you create more buttons, you can just make a new set of functions in the update (including a VbBtnObj2 gameobejct variable) then you should be able to add the new buttons, and trigger their functions.
@jonhgcan4398
@jonhgcan4398 6 жыл бұрын
i was able to do it like that :D thanks for the responses and the help, appreciated very much !!!!!!!!!!!!
Augmented Reality Tutorial | Gaze Interaction in Unity
17:18
Third Aurora
Рет қаралды 62 М.
Happy birthday to you by Tsuriki Show
00:12
Tsuriki Show
Рет қаралды 11 МЛН
Running With Bigger And Bigger Feastables
00:17
MrBeast
Рет қаралды 155 МЛН
Get 10 Mega Boxes OR 60 Starr Drops!!
01:39
Brawl Stars
Рет қаралды 19 МЛН
Survive 100 Days In Nuclear Bunker, Win $500,000
32:21
MrBeast
Рет қаралды 165 МЛН
How To Augmented Reality User Defined Target With Unity 2017 | 2018
25:49
Denys Gamers Tutorial
Рет қаралды 25 М.
A new way to generate worlds (stitched WFC)
10:51
Watt Designs
Рет қаралды 525 М.
How to create an Augmented Reality App
24:19
Playful Technology
Рет қаралды 1,4 МЛН
When Your Game Is Bad But Your Optimisation Is Genius
8:52
Vercidium
Рет қаралды 1,5 МЛН
How to create an AR app with Vuforia in Unity 2017
6:30
CubicBrain
Рет қаралды 25 М.
AR from scratch in 10 minutes using Unreal Engine 5.3!
11:27
FireDragonGameStudio
Рет қаралды 9 М.
It's time for change, it's time for Linux.
10:53
DankPods
Рет қаралды 289 М.
Happy birthday to you by Tsuriki Show
00:12
Tsuriki Show
Рет қаралды 11 МЛН