Pin Behavior: Is there a way to adjust the "stretch" of Rope/Bar?

0 favourites
  • 8 posts
From the Asset Store
Adjusting the game screen for different resolutions (Letterbox scale)
  • I'm working on a project that pins several parts together. Similar to a snake, where the head controls movement and each additional part is pinned.

    When doing this, there is an inherent "Stretch" effect that happens when speeding up and slowing down. It looks great, but my question is, is there a way to control that?

    Can I adjust how much stretch/pull I get when speeding up and slowing down?

    Thanks.

  • The "stretch" effect with Pin behavior is not intentional, it's basically a bug. Check out my comments in this post:

    construct.net/en/forum/construct-3/general-discussion-7/pinning-issues-147318

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The "stretch" effect with Pin behavior is not intentional, it's basically a bug. Check out my comments in this post:

    https://www.construct.net/en/forum/construct-3/general-discussion-7/pinning-issues-147318

    Oh, well that stinks because it's exactly what I want to happen. If that bug ever gets fixed, I have no idea how to achieve it. Kind of wish there was a "Bungie" option for pin to go along with Rope and Bar.

    Maybe introducing Heirarchy fixed this bug. But there is no way to get that same effect with Heirarchy that I can find.

  • You can make the parts of snake body invisible. And move visible sprites to their position with lerp.

  • Here's a behaviorless way to do it.

    First chain tries to replicate the stretch from pinning to pinned objects.

    The rest order from head to tail with an adjustable stretch stiffness.

    dropbox.com/scl/fi/yzrr05uk5ch8fex2hrqrv/chain_stiffness.c3p

    Might be useful or give some ideas.

  • Here's a behaviorless way to do it.

    First chain tries to replicate the stretch from pinning to pinned objects.

    The rest order from head to tail with an adjustable stretch stiffness.

    https://www.dropbox.com/scl/fi/yzrr05uk5ch8fex2hrqrv/chain_stiffness.c3p?rlkey=zrmf55xltlcqht67inff5ic27&st=yuj5hlku

    Might be useful or give some ideas.

    Both are great options. It looks so smooth right now as it is, I hate to mess with it. haha. But I may need to resort to one of these two options.

    R0J0hound Very elegant solution, I would need to figure out how to make it work with the car behavior as the head and the other pieces trailing behind like it does when dragging. Also make it "squish" past default when decelerating. But a great starting point. Thanks.

  • You could replace the drag drop behavior with the car behavior and just disable it on all the instances but the head. Or just set the head instance (sprite.i=0) position to the car.

    Also currently it just pulls objects together if they are farther than 32 pixels apart. You can also make it push the objects apart if you remove the max from the move at an angle equation. I think that’s what you meant by squish together when braking.

  • You could replace the drag drop behavior with the car behavior and just disable it on all the instances but the head. Or just set the head instance (sprite.i=0) position to the car.

    Also currently it just pulls objects together if they are farther than 32 pixels apart. You can also make it push the objects apart if you remove the max from the move at an angle equation. I think that’s what you meant by squish together when braking.

    Thanks, I'll try that.

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