scale action

This topic contains 1 reply, has 1 voice, and was last updated by  Gabriel Kieruzel 5 months, 3 weeks ago.

  • December 5, 2016 at 5:21 pm #158437

    Hi,

    Does anyone have an idea how to make animation in scene editor to move simple enemy forth and back continuously as depicted below.

    x: 0 N
    —————–>
    <—————–
    y: constant

    The main problem is with scale, for Right facing enemy the Xscale
    in dictionary is -1 for the opposite is 1. Tried to add animation with texture then add move action form 0 to N (in X ) in “n” seconds, then from N to 0 in “n” seconds and loops them together infinitely.

    The point is how to switch facing of the enemy from right to left (and left to rigth) at the edges (0,N).

    Regards.

  • December 6, 2016 at 7:41 am #158450

    Hello again .

    Please ignore my above question, I just figured out that I can achieve such behavior using EnemyBumper node. No need to touch SimpleEnemy or Enemy classes. Just put spawning node above two enemy bumpers and that is it .

    Regards.

You must be logged in to reply to this topic.