Deforming a car on impact

For questions about using Classic.

Post » Wed Aug 10, 2011 7:39 pm

Well, ok. But how? We are talking about distorting the mesh relative to the shape of another
( possibly a bad expplenation, so here is a pciture)
off course not as smoot as on the picture, more "bent invards"
B
18
S
4
G
1
Posts: 413
Reputation: 2,512

Post » Wed Aug 10, 2011 7:57 pm

You won't be able to do it in construct. Last time I checked carma quite literally just moved the vertices in their cars depending on the collision. You can't manipulate 3d objects at all in construct. I doubt you can do it with sprites.
B
3
G
3
Posts: 83
Reputation: 1,041

Post » Wed Aug 10, 2011 9:00 pm

[QUOTE=Instant] You won't be able to do it in construct. Last time I checked carma quite literally just moved the vertices in their cars depending on the collision. You can't manipulate 3d objects at all in construct. I doubt you can do it with sprites.[/QUOTE] You can. The action is called "Set relative displacement".
You'd move the vertices dependent on the distance of the overlap. If car2's left edge is at x = 50 and car1's right edge at x = 70, you have a distance of 20 pixels. Translate that to the vertices of Car1 and move them away from the impact point, with a strength dependent on the distance of each vertex from the impact point. The degree of realism of the impact would be dependent on the number of vertices you use per car.

At least I think it would have to be done this way.
Image
B
23
S
8
G
10
Posts: 1,820
Reputation: 8,242

Post » Wed Aug 10, 2011 9:54 pm

[QUOTE=tulamide] [QUOTE=Instant] You won't be able to do it in construct. Last time I checked carma quite literally just moved the vertices in their cars depending on the collision. You can't manipulate 3d objects at all in construct. I doubt you can do it with sprites.[/QUOTE] You can. The action is called "Set relative displacement".
You'd move the vertices dependent on the distance of the overlap. If car2's left edge is at x = 50 and car1's right edge at x = 70, you have a distance of 20 pixels. Translate that to the vertices of Car1 and move them away from the impact point, with a strength dependent on the distance of each vertex from the impact point. The degree of realism of the impact would be dependent on the number of vertices you use per car.

At least I think it would have to be done this way.[/QUOTE]

This^

You can't do collision detection from distortmaps, but you can use a hit box. Ideally you could create a grid of points using the system condition object collides with point. However its a little complicated to rotate those points to line up with the mesh all the time.
Image Image
B
161
S
48
G
89
Posts: 7,347
Reputation: 66,249

Previous

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 3 guests