- Home /
Animating aircraft maneuvers - The best way?
Hi all, I'm working on a project that has an aircraft that will travel in a straight line until given "commands" for various maneuvers. The goal is to have pre-determined paths set so that the aircraft will follow these paths and then once complete, will resume its "idle state" - level flight, awaiting the next input from the user.
For the idle state, "I'm thinking of doing a loop animation for full control of the slight, realistic movement, as an aircraft is never perfectly still.
I've done a bit of research into the best way to achieve the above goals but I'm not quite there yet. I've looked into tools like itween etc but I tend to prefer the control that 3ds max gives me in setting up animations.
Right now, I can create a flight path using a stand-in object in Max using a spline and path constraint, convert the resulting animation to keyframes and export an object following these keyframes as FBX. If I put it into Unity, the stand in object it will animate as intended.
My question really is, is it possible to take these imported animations and apply them all to a single object at various points? IE, import a dummy box object doing a loop into Unity, another dummy box doing a barrel roll etc and then apply these keyframe "tracks" to my main "hero" aircraft model? With some scripting, such a technique would achieve what I want to achieve - ie, have the keyframe animation track appear in front of the current location of the aircraft and get the aircraft to follow it and, once complete, spawn the "idle" keyframe animation in front of it and continue etc.
Is this possible or am I looking at the problem the complete wrong way? I'm very keen to get the views of more experienced Unity users!
Thanks in advance, c.
c0mc0 - coincidentally this very week we were working on simulating the jiggle in flight of a type of aircraft for a client!
i mean it's not that hard if you don't go overboard - just add some random forces and torques. I would urge you to just do this ... actually "simulate" it. it is far far easier than cocking about with animations, in the long run
on the other hand ........ I can appreciate that if you're a skilled animator you will get a beautiful looking jiggle-scene of the plane in flight, that is priceless. if you were on a big project, a $$anonymous$$m of programmers would simulate your thinking on doing that, based on your examples, to make the plane do what you showed in your scratch animations. so it's tricky
Hey Fattie. Thanks for your time. We have considered doing physics based flight and for a user controllable aircraft for a game that would be the way to go, but we're shooting for realism so we'd like that extra fine grained control.
I'm really hoping someone can answer my question above re: Importing keyframes and applying them to another object in the scene - not the one they were imported with. That way, we could easily apply the keyframed maneuvers to multiple aircraft.
right. sorry my comments were of a more general nature
You know, I really suggest you ask a new question: specifically:
"Importing keyframes and applying them to another object in the scene - not the one they were imported with?"
you will get real facts straightaway
(I'm afraid I don't work with animations in that sense much, so I'm hopeless to you. I wan the answer too! )
LOL no worries. happy flying.
I was just this $$anonymous$$ute dealing with an aircraft that ... won't fly on an iPhone4 :-/ Cheers
Answer by Xroft666 · Oct 28, 2012 at 01:43 PM
I think its an intresting way to go.
My suggestions: what do you need in unity - is a huge array of Transforms - simple empty game objects and your aircraft iterpolates by Slerp its position and rotation between those transforms. So there's no animations at all, only transforms spreaded around the scene and aircraft with interpolation script.
What I dont know - how to build this path quickly. Of course, in Unity its a quite work without any curve extensiosns. I am not familiar with max's curve system, so if it is possible to convert a curved spline into empty objects with their positions and rotations, it would be the best way.
there are many things like that on the asset store, if you don't like writing your own paths. click apple-9 for the asset store and grab your credit card!