distort map??!!

For questions about using Classic.

Post » Fri Oct 03, 2008 10:30 pm

how do i use it, i just have no idea, no idea of what i even have to ask?
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

Post » Fri Oct 03, 2008 10:46 pm

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
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

Post » Sat Oct 04, 2008 2:34 am

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:

[code:3dlyxans]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
B
3
S
2
G
5
Posts: 263
Reputation: 2,201

Post » Sat Oct 04, 2008 8:43 pm

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
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 6 guests