Join 02 sprites and move it

0 favourites
From the Asset Store
Move Block
$10 USD
Captivating puzzle game. With challenging gameplay, this game will keep you very engaged.
  • Does anyone have an example of how to join two sprites side by side at the moment that sprite1 touch in sprite2 (collision)? This always should occur only on one side. The first sprite (player)must pulls the second part and the others that touching (like a train). I would also make this junction articulated during movement (Physics + Joint?). Thanks

  • Would pin behavior be something that you are looking for?

    On collision

          Pin Position&Angle to sprite1 to sprite2

    To stop 'pulling' you can unpin the objects.

  • Thaks for the suggestion,

    As I understand it, the sprite 2 is over the sprite 1. Sprite 2 must join in a specific side of Sprite 1. And with respect to the articulated junction? Does anyone have more suggestions and, if possible, an example (capx)? Thanks

  • Well you can do that with pin behavior, so I don't really understand what you are looking for. Something like this perhaps?

    Traincart demo

  • Nice example, But you didn't use the pin behavior. Could you do the same thing that you do with physics? Thanks

  • Just do the pin action instead if creating physics joint.

  • After the train is engaged in the cart, I cannot move them together.

    Obs.: I have replaced the physics to 8directions behavior

  • The game will be in top view mode. The sprites, once together, they will have to go for curved paths. I'm using obstacles to determine the path and 8directions behavior to define the main sprite movement. When I make the curve with the sprite1 and sprite2 (connected by Physics / Pin Join or behavior), the sprite2 remain parallel or slightly changes the angle, ie not accompanying the motion. How can I resolve this in an easy way?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Here is another quick example, from top down view: Train example 2

    Does your joint perhaps allow for too much rotation as it doesn't follow the motion?

    And please, do post your .capx

  • Thanks for the example,

    I change the interface of your file and did some tests. I noticed that the control for Physics was not very good and despite including the solid behavior, there is a moment that the car passes under the obstacle. I am attaching the CAPX to give you an idea.

    test_train.capx

  • FYI, Platform(solid) and physics behaviours don't mix. Solid is a platformer object and doesn't interact with a physics object.

    Physics to Physics

    Platformer to Solid

    I tried this already. I had my platform character trying to jump on a physics box. No go. I needed to either attach a solid behaviour or pin a solid sprite. Also Solid to Solid do no automaticlly provide collision stopping. That only occurs with Bullet/Platformer to Solids.

  • I didn't figure what exactly you wanted to happen in that .capx, so I made the red block follow the player. Is this what you were trying to accomplish? :)

    Train example 2

    You can play with the 3 global variables for different follow behaviors.

  • Thanks for the explanations, jayderyu

    vee41: The game is to maneuver the train to catch all wagons. I will create maps with difficulties. The important thing is that both the train as the cars must walk the path. The train will pull all of them, after engage each. The file that you attached is the same as before? Thanks

  • Fixed the link.

  • Hi vee41,

    This file has a problem. I've tried opening it on two machines. I have attached the image with the error message. This error only happens when I try to open your CAPX. Thanks and sorry for the inconvenience

    <img src="http://dl.dropbox.com/u/72651057/error.gif" border="0" />

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