From the course: AR Development Techniques 04: Advanced Techniques
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
AR shooting game, part 3
From the course: AR Development Techniques 04: Advanced Techniques
AR shooting game, part 3
- [Instructor] Right now the balloons are just spawning at random spawn points but they are not moving up. So let's write some code to implement that. Let's create a new script, create C# Scrip and I'll name this balloon script. Let's add this script to the balloon prefabs because these will instantiate inside the scene. So on each balloon prefab, add the balloon script. Open the script, now to move a virtual object we use the translate function. The translate function moves our object in a particular direction by a specific distance. Now, since we want the balloon models to continuously move upwards we'll need to call the translate function inside the update because this keeps executing again and again and that's what we want. So inside the update function I'll write, transform.translate, vector three.up multiplied by time.delta time So we are calling the translate function on the transform. Transform here represents the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.