0 Favourites

Deforming a car on impact

This forum is currently in read-only mode.
  • Is it possible?

    I want to have a car, using the physics behaviour, and on impact it should be deformed realistic based on velocity and point of impact?

    Not a sprite with predefined images of damages, but with REAL like in Carmageddon 2.

    This is what i've dreamt of all my life making games - realistic destruction.

  • Hmm, maybe make seperate parts for the car and then hinge them together. On collisions, remove hinges until the parts completely fall off the chasis.

  • That's not what i'm talking about. I'm talking about small dent's and complete deformation of the sprite.

    Although your idea is good, it does not fit my needs. I have tried it in the past.

  • Ahh ok, well, you could try applying different distortion meshes to the sprites.

    Another method is to create a sprite for each stage of deformation and then add a custom physics mask for them. Then use the render-to-texture plugin to make the cars have different textures while still using the same base sprite.

  • Ahh ok, well, you could try applying different distortion meshes to the sprites.

    Another method is to create a sprite for each stage of deformation and then add a custom physics mask for them. Then use the render-to-texture plugin to make the cars have different textures while still using the same base sprite.

    Using that method, the damages will still be predefined, the very oppposite of what I want.

    The mesh distortion feature might be what i'm looking for, although not the load feature related to it.

    Anyone who's played carmageddon 2 will know what I'm talking about.

  • Anyone who's played carmageddon 2 will know what I'm talking about.

    I spent a large amount of time playing Carmageddon 2, but if you're using the Physics object then there is no way to use a custom collision mask that isn't pre-defined...unless you use smaller objects pinned together and change their positioning (kinda like voxels).

  • > Anyone who's played carmageddon 2 will know what I'm talking about.

    I spent a large amount of time playing Carmageddon 2, but if you're using the Physics object then there is no way to use a custom collision mask that isn't pre-defined...unless you use smaller objects pinned together and change their positioning (kinda like voxels).

    Alright, but the collisionmask does not need to be upd?ted.

    <img src="smileys/smiley4.gif" border="0" align="middle" />

  • Hmm, maybe make seperate parts for the car and then hinge them together. On collisions, remove hinges until the parts completely fall off the chasis.

    The physics object would go nicely with that.

  • Ohh, in that case then yeah, using mesh deformation should work fine =D

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • 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"

  • 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.

  • 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.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.

  • > 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.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.

    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.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)