
Demonstrate moving objects in a three-dimensional scene using vectors, local versus world axes, and the transform's position, rotation, and scale, then apply script-based motion along the object's forward direction.
Move a Unity object forward in the direction it’s looking by using the forward vector multiplied by speed and updating its transform each frame.
Move an object in the direction it's looking by multiplying speed with delta time, ensuring frame-rate independent motion across machines in Unity.
Use the gizmo's draw icon function to render a texture as an icon at an object's position, importing a carrot texture into assets/gizmos and assigning it as a UI sprite.
Learn to rotate a game object toward a target using quaternions, replace look rotation with rotateTowards, and control rotation speed with delta time for realistic, gradual pursuit.
Learn to orbit a cube around a pivot in Unity by using vectors and quaternions, an orbiter script, and cross-platform input to maintain a constant pivot distance.
Explore when to use local space versus world space for object displacement in Unity, and learn to convert local displacements to world space via transform direction or quaternion rotation.
Learn how vector projection and clamping guide a gun turret along a defined track to continuously face the player in Unity, using a gizmo line and the pulse project script.
Explore root motion in Unity animations, diagnose unintended world displacement, and correct x-axis offsets by adjusting root transform rotation and pose settings to keep motion straight.
Learn to persist data in Unity by saving the player's last position and rotation to a JSON string at the end of a scene and restoring it at scene start.
Convert the object to a JSON string and save it to a Unity persistent data path file, then load the JSON to restore position and rotation.
Implement a reusable ammo pool in Unity 5 using a queue to activate the first available ammo when firing, then hide it and return it to the queue.
Generate a navigation mesh to let the npc patrol the level and avoid obstacles. Attach a nav mesh agent to the character and adjust the agent radius.
Implement a state machine for an AI enemy with patrol, chase, and attack states. A public current state property updates private state, stops routines, and activates correct behavior in Unity.
Explore how the AI enemy uses line of sight checks, state management (patrol, chase, attack), and a navmesh agent to pursue and engage the player, including path calculation.
Learn how to create believable game worlds and behaviours by scripting gameplay in C#. In this comprehensive 3dmotive course targeted at intermediate users, instructor Alan Thorn demonstrates advanced C# scripting techniques and their underlying concepts for solving real-world development problems. Understand core mathematical ideas, like Vectors and Quaternions, for making objects move, rotate and change predictably. See how to apply C# for implementing line of sight functionality, artificial intelligence, collision detection and lots more. In addition, see how to work with large amounts of data, how to understand coordinate systems and spatial problems, and how to customize the Unity editor to work the way you need it to. By the end of this course you’ll have established a highly valuable foundation for coding confidently with C# to develop sophisticated games that are impressive - and marketable.
(Students - please look under Section 1 / Lecture 1 downloads for the source files associated with the lesson.)
More about the Instructor:
Alan Thorn is a game developer, author and educator with 15 years industry experience. He makes games for PC desktop, Mobile and VR. He founded 'Wax Lyrical Games' and created the award-winning game 'Baron Wittard: Nemesis of Ragnarok', working as designer, programmer and artist. He has written sixteen technical books on game development and presented ten video training courses, covering game-play programming, Unity development, and 3D modelling. He has worked in game development education as a visiting lecturer for the 'National Film and Television School', as a Lead Teacher for 'Uppingham School', and is currently a Senior Lecturer at 'Teesside University' where he helps students develop the skills needed for their ideal role in the games industry.