- Home /
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 ?
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.
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 $$anonymous$$athf.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 ...
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 $$anonymous$$athf.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 ...
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.
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.
$$anonymous$$ 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 $$anonymous$$d 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 ... :)
$$anonymous$$ 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 $$anonymous$$d 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 ... :)
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
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#