Search Unity

Bird animation

Discussion in 'Scripting' started by potter3366, Mar 16, 2010.

  1. potter3366

    potter3366

    Joined:
    Oct 15, 2009
    Posts:
    65
    My intention is to make flocking vultures with possibility to interact with one of them using the mouse.
    When mouse is clicking the bird will fly down at mouse position.

    It already has some interesting boids-like behaviour script in Unity 3d:
    http://www.unifycommunity.com/wiki/index.php?title=Flocking

    I'd like to do it procedurally, controlling the bird model bones (flapping wings) in combination with finished animations (when the bird is close the target, bird will flap their wings slowly).

    for example like this one:
    http://3dbud.com/qua.html

    Can someone give me some guidelines?

    Thanks!
     
  2. potter3366

    potter3366

    Joined:
    Oct 15, 2009
    Posts:
    65
    What is the simplest way to extract "birds" with corresponding scripts and sky cubemaps?
    My first step should be playing and experimenting with those seagulls...
    Can someone give me tips on how to get started?
     
  3. andeeeee

    andeeeee

    Joined:
    Jul 19, 2005
    Posts:
    8,768
    Are you having trouble with making the bird models, controlling them with code or ... what?
     
  4. potter3366

    potter3366

    Joined:
    Oct 15, 2009
    Posts:
    65
    I created new scene, add a directional light, then add a terrain and "stationary player". I have successfully imported seagull mesh, all its animations and scripts as the same way as it was in the Island demo. In my case, the SeagullPrefab placed in my project is not seen in camera view.
    Seagull is too far away. I have played with this parameters (SeagullFlightPath.js) quite a bit, but nothing seems to work..How to add more seagulls to the scene?

    var highFlyHeight = 80.00;
    var normalFlyHeight = 40.00;
    var lowFlyHeight = 20.00;
    var circleRadius = 60.00;

    My simple scene:

    http://rapidshare.com/files/364936663/seagulls.unitypackage.html

    Any tips for Flying?
     
  5. potter3366

    potter3366

    Joined:
    Oct 15, 2009
    Posts:
    65
    better results:

    scale seagull 5x
    in SeagullFlightPath.js instead of
    function FlyAway()
    {
    away = player.position + (awayDir * 1000);

    away = player.position + (awayDir * 70);

    But animation is now too slow..?..??
     
  6. bradjensen68

    bradjensen68

    Joined:
    Feb 2, 2009
    Posts:
    274
    For the camera, you need the "Smooth Follow" script. You were using "Look at" and you were too far away.
     
  7. potter3366

    potter3366

    Joined:
    Oct 15, 2009
    Posts:
    65
    I'd like to use static camera. "Look at" script is only for testing there. It's unchecked.
    There are two problems: scaled mesh which caused slow animation and number of seagulls. There is only one, not flocking behavior..
     
  8. potter3366

    potter3366

    Joined:
    Oct 15, 2009
    Posts:
    65
    Does someone has tried to implement a simple prepared animation of birds or fishes with boids scripts (for example in UnitySteer Boid scene instead od cubes)?
    Can someone post example?
     
  9. webphone

    webphone

    Joined:
    Mar 13, 2010
    Posts:
    315
    Have you found any solution for UnitySteer Boid with objects other than cube?