apply sine bahavior to skew x and skew y

New releases and general discussions.

Post » Thu May 28, 2009 12:36 pm

It would be awesome (and seems missing) if I could apply the sinbe behavior to the scew x and y.

thanks
B
2
S
2
G
4
Posts: 124
Reputation: 1,698

Post » Thu May 28, 2009 3:21 pm

just do this by hand

1. create a global variable angle which goes from 0-359 then resets when it reaches 360 (or just use the timer system expression, i use the variable to avoid taking sin of a huge number once the game has been on for a long time, your call :mrgreen: )

always ==> set skew x to sin(global('angle'))*((how much you want it to skew by in either direction)*(1/timedelta))*(timedelta)
B
25
S
3
G
6
Posts: 1,197
Reputation: 5,620

Post » Thu May 28, 2009 5:49 pm

thanks much for the tip. I'll try that.

But the same could be done for height, width, x and y position, yet those can all be selected in the behavior itself.. why not continue the pattern and put the option for skew where it seems to be missing? I know I'd apreciate it. ;)
B
2
S
2
G
4
Posts: 124
Reputation: 1,698

Post » Thu May 28, 2009 6:28 pm

There is a request feature on the tracker.
[url:20bw1pp2]http://sourceforge.net/tracker/?group_id=207820&atid=1003219[/url:20bw1pp2]
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Thu May 28, 2009 7:55 pm

well skew is not a very used feature. sine behavior was meant for simple movements, and many more parameters could be theoretically added to it, but then the plugin gets clunky.
B
25
S
3
G
6
Posts: 1,197
Reputation: 5,620

Post » Fri May 29, 2009 11:49 am

you do realise you can make sine movements using events rather easily don't you?

set skew x/y to sin('PV FOR PERIOD')*('PV FOR RANGE')

the period is controlled by a number from 0 to 360, 180 being 50% 90 being 25% ect.

to add randomisation just randomise when you set the objects pv's to something

start of layout:
set PV 4 range to 100+random(100)
set PV 4 Period to random(360)

this custom sine can be applied to anything.

what you should be requesting for the sine behavior is to get the current value its returning, so that that can be applied to anything. oh yah and an option for "no movement" in addition to height, horiz mov ect.
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

Post » Fri May 29, 2009 11:52 am

Well it's easy to add, about 2 lines of code, so I don't see why not.
B
3
S
2
G
5
Posts: 1,777
Reputation: 5,529

Post » Fri May 29, 2009 4:30 pm

I think it might be better if the sine behavior has a 'value only' mode, where it simply stores the value of the current oscillation. Then you could do 'always - set <anything> to self[sine].value' or something like that. Skew, private variables, meshes, can do anything that way.
Scirra Founder
B
359
S
214
G
72
Posts: 22,952
Reputation: 178,600

Post » Fri May 29, 2009 4:37 pm

[quote="Ashley":2q5bjjnc]I think it might be better if the sine behavior has a 'value only' mode, where it simply stores the value of the current oscillation. Then you could do 'always - set <anything> to self[sine].value' or something like that.[/quote:2q5bjjnc]

Argh, just when I was getting the hang of using real sin and cos. You're enabling my math retardedness!
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Sat May 30, 2009 5:45 pm

That sounds like a great idea Ashley
B
2
S
2
G
4
Posts: 124
Reputation: 1,698

Next

Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 1 guest