LiteTween Help - Rotate

0 favourites
  • 7 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • I'm trying out this behavior for the first time..I'm not entirely understanding it.

    can anyone take a look and tell me what I'm doing wrong? Just trying to rotate an object towards a moving object.

    I'd rather not use the duration parameter since I don't really know the position I'm going to, I want the movement to be that same speed all the time. I think I'm just not understanding how to use this...

    https://dl.dropboxusercontent.com/u/362 ... otate.capx

    thanks..

  • You have to set "Rotate set Target angle" to absolute in your action not to relative. With relative you add up the angles, what gives you a completely wrong value.

  • thanks Asmodean but how do I get it to actually tween? there's no actual movement that I can see. I even set the timescale to 0.1 and it rotated just as fast to the object. I tried duration but that didn't work either..

  • Actually what I really need it to do is automatically always turn toward the target if it's outside it's range. Currently it snaps hard to the target once outside the rang.. I want to tween that movement. It's why I looked into using LiteTween since I couldn't figure out how to do angles with cosp or qarp etc.. and lerp doesn't work since it only eases at the end of the cycle (so it snaps to hard at the beginning of the rotate).

    here's an updated capx:

    https://dl.dropboxusercontent.com/u/362 ... eAuto.capx

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I don't get it to work either. It seems that calling "Set target Angle" after the tweening stops when the X is not in the range it makes the arrow snap if the X is again in distance.

    I get it to work without LiteTween if that will help you:

    I used "Rotate toward angel" and it works well.

  • Asmodean no no, the whole point is I want it tweened.. I can do normal rotate fine.. I want the rotate to ease in and out until it stops..

    I guess it doesn't know when it will stop so therefore probably can't tween..

    hmm.. maybe I need to recheck the distance when it gets to it's target? that way it can actually ease out...

  • The way I want to use it, is the Pointer is also moving.. so the rotation is basically making sure it's traveling toward the intended target.. but when the target is in range it shouldn't rotate at all.. infact it will slow down and stay in range until the target moves away and then it goes after it again..

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)