Set sprite distortion point position

New releases and general discussions.

Post » Sat Feb 07, 2009 12:06 am

right now sprite distortion is pretty strange to use. you have to set displacement of a point rather than give it a position to be at, you should be able to set a displacement points postion rather than its displacement.

the only way to do this requires you to know the position of a point and then do a little formula that i always forget.

plz put an option to set distort point position rather than having only displacement.

btw im wondering how david made that smooth fish example a while ago.
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

Post » Sat Feb 07, 2009 5:30 am

David seemed to do something like what you're requesting for the 'Build a Tower out of Springs' example, but he never provided a .cap. even if it's not exactly what you're requesting, i'd really like to know how he got the goo to stretch between the pairs of nodes like that.
B
2
S
2
G
4
Posts: 254
Reputation: 1,958

Post » Sat Feb 07, 2009 5:56 am

[quote="dfyb":2pc6veit]David seemed to do something like what you're requesting for the 'Build a Tower out of Springs' example, but he never provided a .cap. even if it's not exactly what you're requesting, i'd really like to know how he got the goo to stretch between the pairs of nodes like that.[/quote:2pc6veit]

I think the goo balls and the stretching goo are two seperate sprites, so instad of the goo ball stretching, it's actually a pre done stretching sprite.
Moderator
B
97
S
36
G
19
Posts: 1,584
Reputation: 17,692

Post » Sat Feb 07, 2009 7:35 am

[quote="linkman2004":2h661bmj][quote="dfyb":2h661bmj]David seemed to do something like what you're requesting for the 'Build a Tower out of Springs' example, but he never provided a .cap. even if it's not exactly what you're requesting, i'd really like to know how he got the goo to stretch between the pairs of nodes like that.[/quote:2h661bmj]

I think the goo balls and the stretching goo are two seperate sprites, so instad of the goo ball stretching, it's actually a pre done stretching sprite.[/quote:2h661bmj]
oh, yeah i know the two are separate -- but the stretchy sprite needs to know the coordinates of the two points to stretch to.
B
2
S
2
G
4
Posts: 254
Reputation: 1,958

Post » Sat Feb 07, 2009 2:36 pm

[quote="dfyb":163kireo]but the stretchy sprite needs to know the coordinates of the two points to stretch to.[/quote:163kireo]

actually thats pretty easy to do. theres an action point on one end of the goo cylinder, and it sets its postion to one of the balls, then angles it towards the other. THEN, it always sets its width to the distance between the two balls. Remeber, width is a form of streching :mrgreen:
B
25
S
3
G
6
Posts: 1,197
Reputation: 5,620

Post » Sat Feb 07, 2009 4:34 pm

[quote="Davioware":37fhz9nl]actually thats pretty easy to do. theres an action point on one end of the goo cylinder, and it sets its postion to one of the balls, then angles it towards the other. THEN, it always sets its width to the distance between the two balls. Remeber, width is a form of streching :mrgreen:[/quote:37fhz9nl]

I think he's wondering how the instances are picked since their both the same object.
Moderator
B
97
S
36
G
19
Posts: 1,584
Reputation: 17,692

Post » Sat Feb 07, 2009 7:38 pm

[quote="linkman2004":1ndisr5w][quote="Davioware":1ndisr5w]actually thats pretty easy to do. theres an action point on one end of the goo cylinder, and it sets its postion to one of the balls, then angles it towards the other. THEN, it always sets its width to the distance between the two balls. Remeber, width is a form of streching :mrgreen:[/quote:1ndisr5w]

I think he's wondering how the instances are picked since their both the same object.[/quote:1ndisr5w]

its can be easily done with two variables and two families on said object type.
one variable
all you need to do is

-foreach blue
+green value ('ID') is equal to blue value ('AttachedID') (this picks the second object based on the object ID that blue wants to be attached to)

then goo set position to blue
and then you set goo stretch width to distance(blue.x,blue.y,green.x,green.y)
and angle towards green.
B
52
S
7
G
6
Posts: 1,945
Reputation: 7,610

Post » Sat Feb 07, 2009 8:59 pm

[quote="Davioware":2qmmy9ha][quote="dfyb":2qmmy9ha]but the stretchy sprite needs to know the coordinates of the two points to stretch to.[/quote:2qmmy9ha]

actually thats pretty easy to do. theres an action point on one end of the goo cylinder, and it sets its postion to one of the balls, then angles it towards the other. THEN, it always sets its width to the distance between the two balls. Remeber, width is a form of streching :mrgreen:[/quote:2qmmy9ha]
this worked great. thanks
B
2
S
2
G
4
Posts: 254
Reputation: 1,958


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 1 guest