how do i use it, i just have no idea, no idea of what i even have to ask?
i just started to play with it and it seems to be acting a little weird, when i tell it to set x and y displace to the mouse it moves in conjunction to the mouse but deosnt stretch to the point where the mouse is at, weird
EDIT: why does it set the displace to the distance from the mouse to 0,0?
it seems like it should set that origin to the center of the sprite
nothin a lil maths cant fix
At first, you must set the distort map. It's rows number must be same than cols number, otherwise it doesn't work. The displacement points are indexed from 0 to the number of rows/columns. So when you distort a sprite, you usually want to loop it with nested for:
System: 3 For "x" from 0 to 10
System: 3 For "y" from 0 to 10[/code:3dlyxans]
Use the LoopIndex in loop to set the displace point you want to distort. The x and y displaces mean the amount of pixels you want to move the point.
Try to do something simple at first, for example, applying a constant value to x and y displaces and see the object changing it's position.
The collision mask doesn't update with it, though :I
Develop games in your browser. Powerful, performant & highly capable.
thats fine, all i really need it for is to stretch a sprite (as if it were a polygon since i cant do this using the canvas ) so that it make my soft bodied example a single piece