Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Unity AI Programming Essentials

You're reading from   Unity AI Programming Essentials Use Unity3D, a popular game development ecosystem, to add realistic AI to your games quickly and effortlessly

Arrow left icon
Product type Paperback
Published in Dec 2014
Publisher
ISBN-13 9781783553556
Length 162 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Curtis Bennett Curtis Bennett
Author Profile Icon Curtis Bennett
Curtis Bennett
Arrow right icon
View More author details
Toc

The attack demo


Like our previous demos, we will start with a basic scene with a ground and walls. The demos here will involve an enemy ship attacking a player, so add a ship to the scene, name it player, and add simple controls to move the ship around. Also, tint the color of the material to make the player ship stand out from the enemy ship that we'll add in a moment. Of course, the player ship isn't an AI, so it doesn't need a RAIN AIRig, but it does need to have a RAIN Entity component. With the player selected, go to RAIN | Create Entity. Next, it needs a visual aspect for the AI enemies to see it; from the Add Aspect dropdown, select Visual Aspect and rename the aspect to player. This provides a base for our attack demo. This is how the RAIN attack demos will look with a player ship:

Next, we need an enemy for the attack. The enemies will also be ship models, and as we are focusing on just the AI, we won't worry about the actual game mechanics of attacking, such as having the ship fire...

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 €18.99/month. Cancel anytime