Line Rendering in Fusion 2.5
|
HOW TO RENDER LINES IN CLICKTEAM FUSION 2.5
okay, so im not sure what youd really wanna use this for other than doing some wizardy magic with sightlines, but i figured this out today and thought it was really cool, so im gonna share with you, im too lazy to make images so hopefully this text is enough
setup
first, make 3 active objects, 2 of them are the points your line will render to and from, make sure your able to move them in some way so your able to see the line in action. the last one is going to be your line, it has to be horizontal or else it wont face the correct direction when you apply the angle magic, so it has to be facing right.
the line object
the size of your canvas has to be one pixel only, but the height of the drawing determines how thick your line is, and the color should be black, but you can change it later.
the code
in the event editor, make an "always" condition.
under the line object, make a new event and under the "position" menu select 'select position'
set the position to the first active object, the one that you want your line to come out of.
set a new event, and go to scale/angle > set x scale
once the calculation window pops up, select the line object and go to position > distance with a point
'ODistance( "Active", >X of point<, >Y of point< )' should be what is in the window now. replace the >X of point< by selecting it, going over to the other point object, and going to position > x position, do the same with the y position but, you know, its the y position instead.
create a new event under scale/angle > set angle
since the theorem for angle is quite complicated, here is the calculation to avoid any weird anomalies
'ATan2(Y( "Active" ) - Y( "Active 2" ), X( "Active 2" ) - X( "Active" ) )'
final result
you should now have a beautiful little line, make the point objects invisible and your line looks very convincing!
comment below if you have any issues/clarification requests
|
|
|