Pin behavior position lag

Bugs will be moved here once resolved.

Post » Mon Feb 20, 2012 10:25 pm

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:

http://dl.dropbox.com/u/15217362/nopinlag.capx

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
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,518

Post » Mon Feb 20, 2012 11:01 pm

ok, thanks
B
81
S
50
G
10
Posts: 555
Reputation: 13,009

Post » Sun Dec 16, 2012 7:38 am

If you're still having the problem even after pinning everything to the moving sprite, it's probably because you have the scroll to behavior on your sprite too. I got around this by:
1. remove the "scroll to" behavior
2. instead, go to your even sheet and under system events, select scroll to object and choose the object you wish to follow.
3. on the same event, set your sub objects position to the sprite.

This forces the game to calculate your sub objects position after the scroll is calculated. The final event will look something like:

Every tick
- scroll to Sprite
- set sub object position to sprite
eastmont1272012-12-16 07:40:43
B
1
Posts: 1
Reputation: 527

Post » Thu Feb 18, 2016 2:43 pm

Hi everyone,

I know this topic is old, it seems that the updates fixed this problem.
However, I'm working with Spriter and having this exact issue. I'm pinning a sprite form C2 to a imported sprite from Spriter, and it gets delayed.
Even using other methods like updating position every tick has this delay going on.
Any sugestions?
B
6
S
1
Posts: 26
Reputation: 448

Post » Thu Feb 18, 2016 2:57 pm

@MonkeyBalls
MonkeyBalls wrote:Hi everyone,

I know this topic is old, it seems that the updates fixed this problem.
However, I'm working with Spriter and having this exact issue. I'm pinning a sprite form C2 to a imported sprite from Spriter, and it gets delayed.
Even using other methods like updating position every tick has this delay going on.
Any sugestions?


This a 4 year old 'closed' bug report, which the sticky specifically states that you should not post in.

If you have an actual bug, please post a new bug report, remembering to fulfil all of the Bug Reporting Requirements.

If it's just assistance you require, then please just post in the C2 'How Do I' section.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
120
S
28
G
68
Posts: 4,841
Reputation: 48,283

Post » Mon Aug 29, 2016 12:07 pm

MonkeyBalls wrote:Hi everyone,

I know this topic is old, it seems that the updates fixed this problem.
However, I'm working with Spriter and having this exact issue. I'm pinning a sprite form C2 to a imported sprite from Spriter, and it gets delayed.
Even using other methods like updating position every tick has this delay going on.
Any sugestions?


Hi did you manged to solve this issue by chance?
im having the exact same problem.

i apologize that i post this here.
i tried to send a pm, but i didnt had enough rep points.
B
10
S
2
Posts: 5
Reputation: 510

Previous

Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 0 guests