playMaker

Author Topic: iTween 2d - Look At or Rotate To  (Read 3550 times)

awshima

  • Playmaker Newbie
  • *
  • Posts: 6
iTween 2d - Look At or Rotate To
« on: September 13, 2014, 08:38:28 PM »
Hello,

I have a simple top down 2D game, with a 2D fly landing on a 2D object.

After a while I select another 2D object, and I'm trying to make the fly look at this object while moving at it's position.

I'm using "iTween Move To" and the movement is OK.

But if I use "iTween Look To" passing the target object as the "Transform Target" parameter, the fly rotates to a vertical position while moving, and from the top I can see only a line (since the object is flat - it's a sprite).

Using "iTween Rotate To" the same way, the fly rotates to the same rotation as the target object instead of facing it as moving, but it mantains it's vertical orientation.

Using "Look At 2D Game Object" works as expected, but without any easing.

How can I make this rotation easy with iTween and PlayMaker?

Thanks,

Alexandre

awshima

  • Playmaker Newbie
  • *
  • Posts: 6
Re: iTween 2d - Look At or Rotate To
« Reply #1 on: September 25, 2014, 09:27:36 AM »
A few more comments from a PlayMaker newbie:

It looks like you can't combine iTween actions, one must stop before the other start.

I'm trying to scale + rotate + move at the same time using iTween.

For example, a top down 2D aircraft taking off would scale up (so it looks like it's getting off ground) while rotating to the target and moving torwards it, all in smooth movements (maybe the scale doesn't need any easing at all).

I couldn't find a way to do that with PlayMaker and iTween actions, just placing all the actions one bellow the other doesn't work, at least for me as I'm doing, neither placing each action in it's own state.