Rotating layers to the left

Get help using Construct 2

Post » Thu Sep 12, 2013 8:35 am

Hi,

I'm trying to make a layer rotate in my game depending on how far the player is from the center of the layout.

So I've got this code:



And it works just fine, but I'm having trouble doing the same thing inverted if the player X position is on the left side of the layout.

The problem is that since the default layout angle is 0 (pointing right), if I need it to go negative it goes crazy and everything starts spinning.

Is there anything I can do?

Thanks!
B
125
S
43
G
41
Posts: 849
Reputation: 28,260

Post » Thu Sep 12, 2013 9:43 am

Nevermind, I was supposed to use anglelerp, not lerp. It works now!
B
125
S
43
G
41
Posts: 849
Reputation: 28,260


Return to How do I....?

Who is online

Users browsing this forum: work3 and 6 guests