Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by m4s4m0r1 · Oct 06, 2012 at 10:48 AM · aiairplaneaircraftbot

Simple AI Aircraft Script

Hei guys, i want to make an AI Airplane for my game. But, i dont know how to made it. Can anyone give a simple AI Airplane script. Just simple AI...

Comment
Add comment · Show 10
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Fattie · Oct 06, 2012 at 12:26 PM 0
Share

there's no simple AI

avatar image rhys_vdw · Oct 06, 2012 at 01:24 PM 0
Share

@Fatty Sure there is. Constantly turn towards the player and accelerate forwards. Shoot every n seconds.

cbf writing it right now though, sorry.

avatar image m4s4m0r1 · Oct 06, 2012 at 01:54 PM 0
Share

thank for comment. Actually, i can make an AI to follow me toward. But my problem is how can i make the AI to move like me. For Example if my Aircraft passed an AI, my AI can make a path itself to "attack" me. In this case my AI must made rotation and position to "look and attack" me. but how can i do it???

avatar image Fattie · Oct 06, 2012 at 02:07 PM 0
Share

an incredible simple approach to get you going is just keep using "LookAt".

you should be aware that AI such as you describe ("simple") often has 1000s of lines of code.

hope it helps.

avatar image Fattie · Oct 06, 2012 at 02:54 PM 2
Share

@griffo dude you're totally NOT stupid in any way. you're a smart guy.

i think one of the funniest question ever on here was - literally - I mean literally - headline "Need help urgent - need script" text -- "So I want to make it that the computer can talk back to me in conversation, it's ok if only English. does anyone have the script"

I mean fuck.

Another really hot item at the moment is dynamic mesh building. You get questions like "Need to dynamically create dragon of any shape when user presses button, prefer javascript, can you give me script. it must fly too. also need to change colors"

it's completelly SOP on here that people don't realise how incredibly difficult things are.

the other day someone wanted RT $$anonymous$$P racing (!) sorted out in a few lines of code. "gee this seems hard"

Show more comments

2 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by Dragonlance · Oct 06, 2012 at 02:40 PM

In the sky, the path is everywhere (only limited by the ground ...). So as fattie said, this is basically just LookAt.

Maybe what you want is kinematic behavior, acting to the rules of middle school physics (an airplane will not rotate in a blink of an eye, it has to fly a curve etc.). Google for that stuff.

This link could be helpful http://www.red3d.com/cwr/steer/gdc99/

The AI could be as simple as the desicion where to fly (directly to the player, wabpoint 1-2-3-4 or something).

Harder it gets as soon as you want to have real dynamic flight physics or an AI that makes tactical descisions depending on the enemys and friends movements and situation.

But most likely you will not need complex things. Simple things can look brilliant and be fun, or they even can be a special challange(just look at the WoW bosses and enemys, everything scripted with some randomness and some thresholds for dmg and aggro, no intelligence).

Good luck and have fun!

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image m4s4m0r1 · Dec 10, 2012 at 12:57 AM 0
Share

is there any tutorial for javascript?

avatar image
0

Answer by rhys_vdw · Oct 06, 2012 at 02:39 PM

Pathfinding is for calculating efficient routes through terrain. Since aircraft move around in the air, it is not going to be hugely useful (except for maybe plotting paths around mountains).

What you need to do is define a set of conditions that your AI should recognize, and a set of behaviors that you want your craft to display. Work out how to recognize these conditions, and then execute code that makes it behave in the manner appropriate.

Unfortunately your question is too vague to be answered on this forum, you'll have to do a bit of research. I recommend starting with finite state machines. FSMs are a useful model that can be used for AI and many other game mechanics.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

12 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

AI Have an Input Like The Player 1 Answer

bot AI half working 0 Answers

Aircraft controller script 2 Answers

AI Aircraft/Spacecraft yaw and pitch help 1 Answer

make an AI Flee 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges