1 Reply Latest reply on Oct 30, 2007 7:17 AM by _lw

    3D 'follow' behavior

    Level 7
      Is there a demo behavior somewhere of the following.
      3D character following another character.

      What I mean is that you control charcater 1 and whenever you move it,
      charcater 2, 2, 4 etc may try come towards you. A bit like the Sprite
      follow behavior but with 3D models. If there are no existing demos, can
      you provide direction for this?


        • 1. Re: 3D 'follow' behavior
          _lw Level 1
          Not easy to answere this questions. If there is no collision detection involved, it can be very simple to make a object follow another one. When collision is needed it can become a komplex situation.

          Would be a good idea to describe a little bit more detailed what you want to do.

          To get started, take a look at the "pointat" funktion. This can make object_A look ath object_B. If you now translate object_A into the direction where it points at, you have a very simple method to make object_A follow object_B.

          If you need something more complex, take a look at the A*-pathfinding algorithm. A demo can be found on www.necromanthus.com ->shockwave -> tutorials

          A very simple solution, can be done with "pointAt", where you simply make one object point at another one: