posted something just now without noticing this post, so read the post above if you're just reading this
[QUOTE=Spider_hip] I couldn't get distance function. How can you divide a value which includes 4 values to a value ?
Is there any document that I can find all usable functions on construct with their meanings ?
Thank you very much.
all the usable expressions you can get when you're in that expression editor(anywhere you can type these expressions)
doubleclick on the system icon, and it gives you a list
this list is also handy:http://sourceforge.net/apps/mediawiki/construct/index.php?title=System_Expressions
the distance expression returns the distance between two points
it's the same as using the pythagorean theorem, but that doesn't matter, because you don't need the details to make it work. but it returns one value representing the distance between the first and second point
so you can use it to find out how far away two objects are in pixels
as far as why use the division problem,
when you divide any value by some maximum value, you get a decimal value that represents what portion of the whole you have like
let's say your max is 4
look familiar? it works in alot of situations to give you that perfect value for t in
we used clamp, because we want to force the values to stay between 0 and 1, so the speed we choose for things getting sucked in the black hole won't get blown away from the black hole when they get too far because
lerp works with larger and smaller numbers for t
or lerp(0,10,-0.5)==-5lucid2011-07-19 11:43:48