Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Creating E-Learning Games with Unity

You're reading from  Creating E-Learning Games with Unity

Product type Book
Published in Mar 2014
Publisher
ISBN-13 9781849693424
Pages 246 pages
Edition 1st Edition
Languages
Author (1):
David Horachek David Horachek
Profile icon David Horachek

Table of Contents (17) Chapters

Creating E-Learning Games with Unity
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Introduction to E-Learning and the Three Cs of 3D Games 2. Interactive Objects and MissionMgr 3. Mission One – Find the Facts 4. Mission One – Future Proofing the Code 5. User Interfaces in Unity 6. NPCs and Associated Technology 7. Mission Two – Testing a Player's Learning 8. Adding Animations 9. Synthesis of Knowledge 10. An Extensible Game Framework Pattern in Unity Index

Connecting SplineMgr to NPCScript


To prepare a spline curve to be used by the splineMgr class, we can perform the following steps:

  1. Create an empty GameObject, and set its position to (0,0,0). This will be the parent node to the collection of waypoints. Name it something appropriate, such as curve1.

  2. Create a series of spheres named waypoint1, waypoint2, and so on. Note, we use GameObjects instead of empty objects so that we can enable the mesh renderer on the nodes if debugging or visualization is necessary. Our system will require a minimum of five points and two segments.

  3. Arrange these points in the editor so that they form an appealing curve that meets your needs. Note that we interpolate the position of the waypoints only, so rotating them will not impact the trajectory of the interpolation.

  4. Create a GameObject that will be used to interpolate the curve. Name it SplineObj and assign it to the headObj reference of the SplineMgr class.

  5. Create a lineRenderer component, and attach it to the headObj...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}