tank tracks and elastic

This forum is currently in read-only mode.
  • 'kay, two questions in one.

    http://www.udec.cl/~jfuente_alba/Blast_code.cap

    First: I used the offset effect on a sprite to emulate top down tank tracks, but if the offset is negative it just slides away and if there's rotation involved it just goes NUTS!

    Tried using a tiled background, but apparently that plugin cannot be rotated :O

    Can't figure another way to do this. Any ideas?

    Second: it's supposed to be a wrecking ball attached to the tank.

    I've set it up so if it's out of a given radius (len_chain global) it will set the speed (Wrecking PV speedx and speedy) towards the body of the tank with a speed that depends on how far it is and an elasticity global. I also added a drag coefficient in the globals. The movement is rather wonky, has anyone a better approach? I want to achieve an elastic behaviour, after a certain distance the elastic should tense and apply force.

    Tomorrow I will attempt actual force equation. Too tired now.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Instead of using shader effects I'd use an animation.

    http://dl.getdropbox.com/u/666516/speedy.cap

    Simulating movement is fairly easy to do, just make as many frames as you have segments of track, and for each frame move one segment down the line.

  • Yeah, I'd make animation for something so simple...

    If you get stuck I can make something for you quickly, it wont be hard...

    ~Sol

  • Updated the .cap

    Tank tracks look beautiful now used distortion map, doubled the sprite along the tiling direction and uv-scrolled it, resetting to wrap.

    Now, I wanna have two tracks on this tank attached each to a point and set their distortions independently. Should I have two different objects with each its own image? or is there a way to manage that with instances? Tank body already has two image points.

    Wrecking ball is a wreck, will implement proper elastic physics into it next time.

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