Is there an expression to pick the *real* angle of an object

Discussion and feedback on Construct 2

Post » Fri Feb 13, 2015 2:01 pm

...even if the object's Sine Angle is changing it's de-facto angle?? :roll:
B
56
S
19
G
4
Posts: 342
Reputation: 5,998

Post » Fri Feb 13, 2015 9:56 pm

If I ever need to do this, I usually implement my own sine behaviour so that I can have a variable called BaseAngle or whatever and apply the sine to that angle. I'm not sure if there's a good way to do it with the sine behaviour.
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,465

Post » Fri Feb 13, 2015 10:22 pm

something like this?
Text Set text to
180.0 + Sprite.Sine.Value / Sprite.Sine.Magnitude * 180.0
B
8
S
3
Posts: 63
Reputation: 736

Post » Fri Feb 13, 2015 11:16 pm

I've implemented another workaroung, basically i've created a second sprite attached to the player (who has the sine), this Sprite follows the same movements of the player sprite (responds in the same way to the key imput etc), but does not have the sine. When the game needs to know the base angle, i tell it to use the new Sprite's one.

That's not very efficient, but looks effective. i still need to try out your suggestions.
B
56
S
19
G
4
Posts: 342
Reputation: 5,998


Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 1 guest