How do I combine solid and orbit without this happening?

0 favourites
  • 8 posts
From the Asset Store
In this template the music plays without looping in your game
  • As you can see, I want a platform rotating around a specific point. I'm using every tick to set the platform's location to the object in the back. Problem is, it's almost like the solid behaviour is playing catchup with the orbit, like there's a frame delay.

    You can see in the gif that it doesn't look good.

    Hoping there's a fix for this that I've missed.

    TIA

  • I think the best solution would be temporary pinning the character sprite to the platform (when player is not pressing any keys).

  • As you can see, I want a platform rotating around a specific point. I'm using every tick to set the platform's location to the object in the back. Problem is, it's almost like the solid behaviour is playing catchup with the orbit, like there's a frame delay.

    You can see in the gif that it doesn't look good.

    Hoping there's a fix for this that I've missed.

    TIA

    Maybe I do not quite understand what you mean.

    But to implement this, it is enough to set the behavior of the Orbit platform. And the character will interact beautifully with the platformer.

  • LukeW I think the issue your struggling with here is that the orbit behaviour updates later in the tick than most behaviours. The platform behaviour is seeing the platform before orbit has updated it, hence it appears to be lagging by 1 tick.

    The reason why it behaves like this is due to "orbit pin" ability. By ticking later it guarantees that the object it is pinned to updates before it in the tick, so that when it updates it's not out by a tick. But of course causes other behaviours to be out of sync. The "pin" behaviour uses the same technique, and has similar gotchas. As dop2000 mentions you can probably work around this by using the pin behaviour to stick the character to the platform temporarily.

    If you file a bug about this on the tracker ( should be easy enough to create an example project ) then we can discuss it with Ash. It's a difficult issue though.

  • I saw this a few years ago. I don't know if it is still relevant.

    twitter.com/2xTacker/status/917781791066423296

    Alternatively, have you tried Wait 0 for updating the helper sprite's position? That should make it run at the end of everything else in the sheet, although again I don't know if that would make a difference with behaviors.

    The true solution would be to use sin and cos to determine where the object should be, in effect recreating the orbit with events rather than using behavior. Then you have control of when the position gets updated.

  • oosyrag, thank you!

    The true solution would be to use sin and cos to determine where the object should be, in effect recreating the orbit with events rather than using behavior. Then you have control of when the position gets updated.

    I tried this and was still getting the effect, but then you said

    Alternatively, have you tried Wait 0 for updating the helper sprite's position?

    And it worked. Haven't bothered to try it with the orbit behaviour, as I now essentially have what I need. Solution below if anyone needs it for future reference. Also, thanks dop2000 and I honestly hated the idea of pinning the player to the platform though, so am glad it won't be necessary :P

    edit - not sure why I can't tag Nepeo, but thanks anyway mate :)

  • No worries LukeW :) The site sometimes has difficulty recognising user names for boring reason, you can use [ @Nepeo ] instead and it generally works.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Yep, in my first post, I wrote your name with a lowercase 'n', which I figured was why it didn't work. Then an edit did nothing, so I tried deleting the post and trying again and still nothing, so I threw my hands up and said 'oh well!'

    :D

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