How to pull a crate / box ?

  • Hi all,

    I'm basically trying to pull a crate in the platformer protoype I'm making.

    I managed to push the crate from left and right using the platformer behaviour, but can't manage to get the crate follow the character when pulling. Actually I did manage to pull it but then the crate at some point overlapped with the player, which got stuck inside. That's why I should probably not use the platformer behaviour, but I'm not sure how to actually do it differently.

    To detect when the avatar should be pulling / pushing the crate, I have put a rectangle that is perpendicular to the avatar. When it overlaps with the crate, and the player presses B on the gamepad, it will pull or push the crate depending on the direction of the stick.

    Any help would be gretaly appreciated!

    Cheers,

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • you can use the PIN behavior (only position) .... for example when (your trigger)... pin crate to player..... when (your end trigger) crate>>unpin

  • This need more work but, shows one option. Other thing would be that when pushing or pulling you would control the crate and move player relative to it.

    Of course a lot of it depends from your control setup.

  • Thanks a lot both of you!

    I used Katala example to move the crate, that works like a charm. Greatly appreciated the time you put in creating that file!

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