[PLUGIN]Math-update 9/11(additional features)

Completed plugins, behaviors and effects.

Post » Sat Jun 25, 2011 5:03 pm

[quote="newt":2kjwtdb0]I thought yaw didn't reset when you got to 360.[/quote:2kjwtdb0]

The main problem is getting a value between 0 and 360, without the minus. The setting it to zero option was an after-thought. I can't work out how to do anything with the plugin at the minute. :oops:
B
19
S
6
G
7
Posts: 1,205
Reputation: 7,298

Post » Mon Jun 27, 2011 10:33 am

Solved it, without the plugun.

+ System: Start of layout
-> yawmaths: Set 'yaw' to 0

+ MouseKeyboard: Key Left mouse button is down
-> yawmaths: Subtract 1 from 'yaw'

+ MouseKeyboard: Key Middle mouse button is down
-> BaseA: Set roll to BaseA.Roll-2 degrees
-> TopB: Set yaw to TopB.Yaw-1 degrees

+ yawmaths: Value 'yaw' Equal to -1
-> yawmaths: Set 'yaw' to 360

+ yawmaths: Value 'yaw' Equal to 361
-> yawmaths: Set 'yaw' to 0
+ System: Always (every tick)
-> yawmaths: Set text int(yawmaths.Value('yaw'))


B
19
S
6
G
7
Posts: 1,205
Reputation: 7,298

Post » Mon Jun 27, 2011 10:31 pm



sorry for the late reply brobs, but I think you might have misinterpreted the point of the anglelerp feature
normally if you lerp two angles like
lerp(245,15,0.5), instead of going from 245 up to 15 crossing the 360/0 boundary, it would go backward down to 15
this let's you lerp the shortest route of 2 angles even if it jumps the 360/0 boundary.
now that it's solved I won't go back and figure out what you were trying to do in greater detail, unless you'd like me to
in which case...I will
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Tue Jun 28, 2011 2:25 am

Hi lucid, I have suggestion about new expression, I think it will be very handy.
Something like usual lerp, but with persistent speed. Like lerp\cosp it will have starting value, goal value and change speed rate. I know I can compare values to determine in wich side move from starting value, but to have it all in one expression will better.
(Sorry if I missed something like that already exists)
B
2
S
2
G
2
Posts: 158
Reputation: 1,366

Post » Tue Jun 28, 2011 2:28 am

that's a good idea dtrq
I was planning to add math actions as well
hadn't thought of that one in particular
probably not anytime soon, but shouldn't be too difficult
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Wed Jun 29, 2011 12:58 am

I got one.
How about an expression to tell if a number is prime?
... been reading on Toms post about tiling images using primes
Image Image
B
161
S
48
G
90
Posts: 7,348
Reputation: 66,751

Post » Wed Jun 29, 2011 12:00 pm

This is shaping up nicely lucid! Even I did once an example that had to deal with line intersections. Now I don't have to use the math formula anymore, very handy! :)
B
21
S
6
G
10
Posts: 1,024
Reputation: 7,445

Post » Tue Aug 30, 2011 11:14 pm

small update.
the anglelerp expression no longer has the limitation of needing to have two angles that are between 0 and 360, shouldn't have been there to begin with honestly
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Fri Sep 02, 2011 2:02 am

some vector math ops would be nice, like cross product, dot product, angle between vectors, 3d distance, all for 3d vectors obviously.QuaziGNRLnose2011-09-02 02:02:55
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

Post » Sun Sep 11, 2011 3:24 am

hi guys, big update. For those of you who could just never get the whole moving things with lerp thing, or for those who get sick of typing in the events, Math now has actions to autointerpolate over time. there are two different methods.

the first is to create a value for interpolate, that you can retrieve from expressions.

The second is to interpolate object positions,rotations,and dimensions automatically over a given time. like being able to order an object to a location. there are also triggered conditions for when interpolation completes, and actions to pause and resume interpolation. using the automated interpolated value actions and expressions, you could automate anything like pv's, opacity, and color.

also, the interpolation allows you to set a speed curve control point anything from 0 to 1, 0 is ease in, 0.5 is linear, and 1 is ease out.

hope it comes in handy, have fun!!!lucid2011-09-11 04:01:49
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

PreviousNext

Return to Completed addons

Who is online

Users browsing this forum: No registered users and 0 guests