Pin Behavior Bug

0 favourites
  • 4 posts
From the Asset Store
Wall Pin Board is a hyper causal game developed for fun and inspired by YouTube video whose link is given in description
  • I've had this problem many times. When I pin a few objects to a same one (position & angle or position only), some objects (together with their instances) have a delay in their changing position when the object they are pinned to is moving, while the rest of the objects are fine.

    So, if you have an object A moving right, and there is another object B pinned to it, object B will trail behind object A and the faster object A is moving, the bigger the distance between A and B will become.

    I've had this bug A LOT of times, and I've no idea how to deal with it and what's causing it..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I believe it is a limitation due to how construct handles objects. But yea, I would like this issue resolved too.

    My guess is that When one object gets repositioned, the pinned object only knows it was repositioned on the next game tick/cycle, so there's always a one frame delay between them.

    here's some info I found by doing a quick search.

    I'm afraid I don't think this can be fixed: the Pin behavior is already coded to run *after* the events so it gets the latest position of the object. As you can see from this modified example there is no lag at all if you only use a single pin:

    The problem comes from using two behaviors at once. Construct 2 does not run behaviors in any particular order. So in this case the pin behaviors run in the wrong order and the second pin updates before the first, so it is always one frame behind. I don't think there's any good fix for this - it's how the engine has always worked. It's easy to workaround with events though, the Pin behavior is pretty simple. I'm afraid this appears to be the only solution. If you do it all by events you have exact control over the order it happens in, anyway.Ashley2012-02-20 22:25:33

  • Hmm, okay.. Thanks for the useful info!

  • Closing, please see the bug report guidelines.

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