LiteTween Help - Rotate

Get help using Construct 2

Post » Sun Aug 23, 2015 7:02 am

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..
B
98
S
32
G
16
Posts: 1,204
Reputation: 16,715

Post » Sun Aug 23, 2015 10:49 am

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.
B
24
S
3
G
1
Posts: 451
Reputation: 2,165

Post » Sun Aug 23, 2015 2:37 pm

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..
B
98
S
32
G
16
Posts: 1,204
Reputation: 16,715

Post » Sun Aug 23, 2015 3:00 pm

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
B
98
S
32
G
16
Posts: 1,204
Reputation: 16,715

Post » Sun Aug 23, 2015 4:28 pm

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:
Image

I used "Rotate toward angel" and it works well.
B
24
S
3
G
1
Posts: 451
Reputation: 2,165

Post » Sun Aug 23, 2015 9:30 pm

@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...
Last edited by jobel on Sun Aug 23, 2015 9:34 pm, edited 1 time in total.
B
98
S
32
G
16
Posts: 1,204
Reputation: 16,715

Post » Sun Aug 23, 2015 9:33 pm

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..
B
98
S
32
G
16
Posts: 1,204
Reputation: 16,715


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 41 guests