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 /
This post has been wikified, any user with enough reputation can edit it.
avatar image
-1
Question by jonathan · Jul 26, 2013 at 05:44 PM · spacegame

realistic spaceship control

good guys, first deskulpe traduçao the bad, I am Brazilian and to using the google translator. but anyway I am not good at programming but would like to know how to script and how to apply it. the case is for a space game where the aim of the cannons would be centered in the middle of the screen and the ship would have mov free scenario with the keyboard controls. what I'm getting is that the same result: https://www.youtube.com/watch?v=SmID66L9Y3M

I thank anyone who can help, right now.

Comment
Add comment · Show 3
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 jonathan · Jul 27, 2013 at 03:07 AM 0
Share

and what about this: https://www.youtube.com/watch?v=iTEojkgcphg

this, W - accelerate, S - slow down, A and D - fly to left or right, Q and E - spin left or right. mouse cursor crosshairs course, CTRL - inertial flight, SPACE - after burner.

avatar image AlucardJay jonathan · Jul 27, 2013 at 03:13 AM 0
Share

Please don't post comments as answers. Post comments by clicking the [add new comment] button, a window then open for you to type in. Answer fields are for answers only, as this is a knowledge base.

Here at Unity Answers, Answer means Solution, not Response.

  • Read this page : http://answers.unity3d.com/page/newuser.html

  • Please watch : http://video.unity3d.com/video/7720450/tutorials-using-unity-answers

I have converted this one for you.

avatar image AlucardJay · Jul 27, 2013 at 03:26 AM 0
Share

I assume there is an empty gameObject attached to the camera that the ship is lerping to : http://docs.unity3d.com/Documentation/ScriptReference/Vector3.Lerp.html

Please consider following the advice given in the answers here. Do lots of little projects and tutorials before making a big project. This is actually faster than trying to do just a big project and learning everything as you go. Just do one thing, understand it, then learn something else.

Upvote for everyone =]


Here are some links I strongly suggest to all new users :

Start at the bottom and work up : http://www.unity3dstudent.com/category/modules/

this is the YouTube link for the above as one playlist : http://www.youtube.com/watch?v=-oXYHNSmTxg&list=PL27B696FB515608D2&feature=plcp


That is good to get started. Then start with a small tutorial, this is a simple 2D space shooter : http://www.unityjumpstart.com/ProofOfConcept_1/ : click on the videos part1.mp4 part2,3,4 =]

I found another by Eric : http://wiki.unity3d.com/index.php?title=2DShooter : http://forum.unity3d.com/threads/7883-2D-shooter-tutorial

By then you should be getting the hang of things and starting to have ideas of your own. When you decide what kind of game you want to make, then look at each part you'll need. For example, if you want to make some terrain then walk around it with a character : http://cgcookie.com/unity/2011/12/05/introduction-to-character-controllers/

Basically then just search for tutorials, there are many out there, either written or on youtube.

the Unity Wiki tutorials : http://wiki.unity3d.com/index.php/Tutorials

A big list of tutorials : http://answers.unity3d.com/questions/12321/how-can-i-start-learning-unity-fast-list-of-tutori.html

A very helpful 'site, all in C# : http://unitygems.com/

Helpful page with information on using Built-In Arrays and Lists (you'll need this later!) : http://www.unifycommunity.com/wiki/index.php?title=Which_$$anonymous$$ind_Of_Array_Or_Collection_Should_I_Use?

The unity wiki link above is very handy with lots of scripts and shaders too (just check out all the links down the left, and the tabs along the top : http://wiki.unity3d.com/index.php/Scripts )

http://answers.unity3d.com/questions/148211/list-of-frequently-asked-beginners-questions.html

http://forum.unity3d.com/threads/132628-How-to-help-the-Absolute-Beginner

If you know what kind of game you want to make, edit your question and write there what you are thinking of, then there may be a tutorial out there for that, Happy Coding =]

4 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by Kiloblargh · Jul 26, 2013 at 07:28 PM

A realistic space game is pretty easy to do; all you need is Input.GetAxis and Rigidbody.AddForce / AddForceAtPosition.

If you have written a script and you have a problem with what it is doing, then you should ask on Unity Answers, posting your properly formated script for us to look at. If you are just asking someone here to teach you how to program assuming no knowledge; no, go read some C# for beginners reference material. Or if you are asking someone here to program the game for you so you don't have to learn; again no.

I often tell Unity beginners to start with making something like Asteroids so you're starting in the right place- but, unless you take the time and effort to go look up everything you need to figure it out yourself, there is no point.

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
avatar image
1

Answer by robertbu · Jul 26, 2013 at 07:33 PM

Hello to you in Brazil. Google translator did a pretty good job. I hope it does as well going the other direction.

What you are asking for is code to solve multiple technical problems. This is not what UA is all about. We help you solve individual technical issues so you can write your own code. The script for the ship movement in the video is fairly sophisticated. Here is a simple script you attach to the camera to get you started:

 #pragma strict
  
 var speed = 75.0;
  
 function Update() {
    var v3 = Vector3(Input.GetAxis("Vertical"), Input.GetAxis("Horizontal"), 0.0);
    transform.Rotate(v3 * speed * Time.deltaTime); 
 }

As for shooting, there are a huge number of posts on UA. Google for combinations of 'unity3d', 'shoot', 'projectile', 'bullet', 'raycast', 'spawn point'. The one tricky part of your problem is that the bullet is aimed from the center of the screen, but it is shot from someplace else. To make this happen, you can raycast to find the position in 3D space hit, then you can use a Transform.LookAt() on the spawn point to aim the bullet in the correct direction.

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
avatar image
1

Answer by JuanseCoello · Jul 27, 2013 at 02:23 AM

You can download the book, "Unity 3 Game Development Hotshot" with the scripts codes. to make your airplane shoot, just investigate and change the player with the airplane. It also teaches a lot of helpful stuff to start programming.

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
avatar image
0

Answer by hardcorebadger · Feb 28, 2018 at 09:10 PM

This asset looks right along these lines, its super smooth and also fully commented so you could check that out - worked as a great base for my space game, then I built it up from there adding guns, etc.

https://assetstore.unity.com/packages/3d/vehicles/space/low-poly-space-ship-ultra-smooth-360-controller-111640

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

18 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 avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

2D Realistic Space Collision. 1 Answer

Simulating Rocket stage separation. 0 Answers

Keeping track of lots of entities 2 Answers

Traffic transport system in 3D space 0 Answers

Is SkyBox still the way to go? 1 Answer


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