How do I make my avatar stick to a rotating object

0 favourites
  • 7 posts
From the Asset Store
This is a twin stick shooter similar to Enter the gungeon,Nuclear Throne, Helldivers & Soul knight for the mobile device
  • Forgive me if this has been discussed before, but I wasn't able to find exactly what I'm looking for.

    I have a an object with physics added to it so that it behaves as it is swaying in the wind. I also have a character controlled by the player (sticking to a bounding box that has the Platform behaviour added to it), and I'm trying to make it so that the player can jump onto this platform and follow its movements smoothly (while standing still). If the object doesn't sway, it's fine, but as soon as some angle is applied, the character will sort of flicker and move slighty, which doesn't look good at all.

    (The platform is sticking to another object with physics applied with Immovable set to Yes using joints.)

    Any idea how I can improve this?

    Let me know if you need any more info.

  • you could use the pin behavior to pin your player to the platform as long as he is not moving. when he starts moving unpin him.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I've tried to play around with the pin behaviour, but I'm not sure I'm using it correctly.

    [attachment=0:fu314qpa][/attachment:fu314qpa]

    I'm also not sure exactly what other behaviours I need. The playerbox only has the platform behaviour, but when I add physics to the rotating platform I want to be able to jump on, the character just falls through it. Adding Solid as well as Physics to the platform enables to character to walk on it (but not smoothly). Adding physics to the playerbox seems to mess things up even worse.

  • Physics behavior doesn't usually play nice with others,you better find another way to do that.

    If you want to use physics,use only that.

  • Ok, maybe it's easier if I can get the platform to rotate using a different approach. Thanks guys.

  • There's a rotate behaviour

  • Hey,

    If I got it right you could try to add to disable the platform behavior if the player is not moving.

    E.g. :

    no key pressed = platform disabled and pin enabled

    any (move input) key pressed = platform enabled and pin disabled

    Cool idea btw. Let me now if that works.

    Cheers

    Marco

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