How do I draw a physical line?

0 favourites
  • 6 posts
From the Asset Store
solution for games like "fruit ninja" and drawing applications
  • So how do I let player draw physical line (like the one in "Love Balls").

    Subscribe to Construct videos now

    I tried connecting multiple rectangles by limited revolute joints, but then the line still "bends" at those joints, so it's more like a spring rather than a single solid line. It gets more stable if I increase stepping iterations, but it's still far from perfect and also affects performance

    Tagged:

  • If you need rigid connections, you have to make triangles. For example:

    Red lines represent joints.

    And of course you should try to minimize the number of objects with joints.

    Maybe build the line with just a few big sections using long invisible sprites with Physics. And draw a smooth visible line with small visible dots, pinned to Physics sprites.

  • dop2000 Thanks for suggestion

  • Never actually tried this, but could you do the usual drawing lines thingy , but add physics behavior to sprites used to draw and set them to immovable. Then is seems you would not need joints at all, and since they are immovable they would ( obviously ) not move.

  • BadMario Obviously it would work, but I need it to be movable, and move as a single solid structure (like in Love Balls)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ahh, should have checked the video of the game first. So it needs to be able to drop like that.

    I am afraid physics behavior will only work with interaction with balls, but as far as physics between the drawn structure and the rest of the environment, probably will need to code your own physics with events.

    Draw an imaginary bounding box around the structure then test that for collisions with the environment

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