• 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
Question by sanghai · Sep 20, 2011 at 06:15 AM · cameracamera-movementairplanecamera-scrolling

How to start with camera and Airplane for the game ?

I am new to the unity and I am trying to make game like Air Strike 3D .I am facing few difficulties at the initial stage. I am not able to recognize how is the AirStrike3D camera working and Airplane working.

is Camera constantly moving in Z direction and Airplane is following camera ? or is Airplane constantly moving in Z direction and Airplane following it ?

How to go about it ?

Comment
Ampler Games

People who like this

1 Show 4
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 syclamoth · Sep 20, 2011 at 06:37 AM 1
Share

This really depends on exactly what you want to do- if your plane is locked into a set path, then just make the camera fixed and move the plane relative to the camera. The camera follows a set rail, the plane moves around in front of the camera.

avatar image sanghai · Sep 20, 2011 at 08:12 AM 0
Share

Yah but in strike 3d game if plane scrolls left and right camera also scrolls now that's where i have got stuck ... I have tried possible solutions

First I created script for Airplane which will have target camera...s that camera will move according to the airplane... But now While doing this I faced problem that my camera will behave like FollowCamera i.e. Airplane will always be in center of the camera and it will not be able to move freely in the provided place ...

So I chuck that plan and started writing script for Camera Where I took Abs(camera.position - target.position) > scrollDistance) ... and I started moving camera but now while doing this I am facing two issues camera is not scrolling properly its getting jerk in between

now I tried to do Mathf.SmoothDamp but this makes my camera scrolling too slow ...I tried changing the values of smoothVelocity etc.. but still facing the issues of jerk and slow motion...

So i m stuck now are my logics right ? or maybe I have done too many things with camera that I am stuck ...

avatar image sanghai · Sep 20, 2011 at 08:14 AM 0
Share

Yah but in strike 3d game if plane scrolls left nd right camera also scrolls now that's where i have got stuck ... I have tried possible solutions

First I created script for Airplane which will have target camera...s that camera will move according to the airplane... But now While doing this I faced problem that my camera will behave like FollowCamera i.e. Airplane will always be in center of the camera and it will not be able to move freely in the provided place ...

So I chuck that plan and started writing script for Camera Where I took Abs(camera.position - target.position) > scrollDistance) ... and I started moving camera but now while doing this I am facing two issues camera is not scrolling properly its getting jerk in between

now I tried to do Mathf.SmoothDamp but this makes my camera scrolling too slow ...I tried changing the values of smoothVelocity etc.. but still facing the issues of jerk and slow motion...

So i m stuck now are my logics right ? or maybe I have done too many things with camera that I am stuck ...

avatar image syclamoth · Sep 21, 2011 at 09:11 AM 0
Share

You duplicated your comment there, might want to fix that...

I think you need to sit down with a piece of paper and a pencil, and work out exactly what it is you want your game to do.

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Silencerx · Sep 21, 2011 at 07:50 AM

you could possibly think of it in a different manner.

the camera doesn't move and the plane is confined to the space on screen, then just move the terrain with the stuff on the terrain parented

this is the method i use for my top down shooter, now granted this one adds perspective and a complex 3d terrain, but really all you have to do is create your terrain in an app like 3ds max and animate the terrain on the path you want, link a finish collider to the end and walla! theoretically it should work, even with ground enemy's or turrets.

Comment

People who like this

0 Show 4 · 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 sanghai · Sep 21, 2011 at 09:19 AM 0
Share

Alex thank you soooo much... thanks a lot dude !!! I liked your idea I will start working on that soon because in my last idea I was stuck with maths and that's you found too many posts from my side .. I guess your this idea is more perfect ..... d only question I have in my mind rite now before starting is .... how to add the box on both the side for collision stuff i dont have idea about that collision stuff ... .I am new to unity and its javascript ...

thanks a lot again and I will need your help in future...becoz u have exactly understood what i want to make ... :)

avatar image sanghai · Sep 21, 2011 at 09:19 AM 0
Share

Alex thank you soooo much... thanks a lot dude !!! I liked your idea I will start working on that soon because in my last idea I was stuck with maths and that's you found too many posts from my side .. I guess your this idea is more perfect ..... d only question I have in my mind rite now before starting is .... how to add the box on both the side for collision stuff i dont have idea about that collision stuff ... .I am new to unity and its javascript ...

thanks a lot again and I will need your help in future...becoz u have exactly understood what i want to make ... :)

avatar image Silencerx · Sep 22, 2011 at 06:19 AM 0
Share

yea i'd be happy to help, I don't know unity javascript though I use C#

if you need help you can email me at alexhackl - at - live.com

avatar image sanghai · Sep 22, 2011 at 07:52 AM 0
Share

yes dude i have started working on C# only because i have heard that unity javascript defers from the original javascript ...thats y i m trying to work on C#

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.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

Rotate cam with object, smooth boost and brake 3 Answers

Airplane follower camera script 1 Answer

2D camera switch 1 Answer

Is there any way to keep game object withing the limit of Camera FOV 3 Answers

Want Object to move freely in Camera's Limit 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