Shaking dialog and UI text

0 favourites
  • 6 posts
From the Asset Store
Template for a generic save / load system, fully documented in comments and video
  • I tried searching for this but couldn't find anything in the forums about it. Thanks in advance for any help!

    I'm having a problem where my text dialog and UI shakes when my hero is moving.

    I'm setting the position of the speech bubble and the position of the next in the same event and doing it every tick. My text is a Sprite Font object and I'm setting it's position to an image point on the speech bubble, which is being set to an image point on the player sprite.

    You can't see my UI in the GIF, but it's simply anchored to the top right using the behavior, and it shakes as well when the camera moves.

  • You could put the UI on a layer that has parallax set to 0, 0? That way it's x, y coordinates always stay the same (unless you need to have the UI in areas related to the layout, but I prefer the 0 parallax method)

    As far as the text, you could probably just use a pin behavior and pin it to the speech bubble itself.

  • Thanks blekdar, I'll give both of those a try!

  • I had similar trouble when I was pinning objects to something else that was then pinned to a different object. The only way I could get rid of the lag was to pin everything to the same top level object. So if you are setting the bubble to the player position, then setting the text to the bubble location - try setting the text to an offset of the same player coordinates that you are setting the bubble to. That way it can't be a frame behind.

  • I quickly tried setting the UI layer parallax to 0,0 which worked like a charm. Thanks!

    I've not tried using the pin behavior on the Sprite Font, but it sounds promising. Thanks blekdar and

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Pining the object to the player worked!

    But, now I'll need to set multiple image points on the player for different text alignments (and I'll also need to adjust the text for when the sprite is flipped so it doesn't appear outside the bubble. That's two image points for each dialog alignment!), so unfortunately it's a little more work than I would like. I still don't fully understand why pining it to the speech bubble caused the lag and I have to think that's a bug. But maybe something is just going over my head?

    As you can see in my GIF, I'm still working on getting the text position to be right all the time, but it no longer jitters.

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