How the cannon will shoot a cannon ball towards Hero

Hi every one I am making a small game in which the Actor(Hero) will be moving left and right , and there will be a cannon which should spawn cannon fire balls towards actor(Hero)
Iam unable to make the cannon to fire towards the Actor(hero).
If any one knows please help me..

Thank You

Comments

  • jeezzcakejeezzcake Member Posts: 144

    Create two game attributes ( heroX, heroY ).

    In the hero actor, constrain heroX to hero position x and heroY to hero position y;

    In the cannon ball actor put a Move To behaviour with Position (heroX, heroY).

    I think this should do it.

  • Simple AppsSimple Apps Member Posts: 158

    @‌ jeezzcake

    Thank U...It worked out...

Sign In or Register to comment.