How do I pin an object to a moving object

0 favourites
  • 4 posts
From the Asset Store
Hand-painted tiles, objects, animated objects, and background to build a colorful Mayan civilization environment.
  • Hi, I wonder is someone could help?

    i have 2 animations/objects 1 moving vertical, the other horizontal. I am after the vertical object to pin to the horizontal object. When they collide I need the horizontal object to drag the vertical object along. I have managed to get the vertical object to pin if you like, but I cant get the horizontal object to drag it along.

    I hope it makes sense.

    Any help would be awesome,

    Thanks

  • One option would be to make a dummy vertical object already pinned to horizontal one On-create and then hid. Upon collide destroy the vertical object and unhide the dummy version. If you release the vertical one you could re-spawn it at location and hide dummy again. This way you won't have to worry about the controls for the vertical getting in the way (especially if you grouped them and then disabled group when dummy was active).

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ok thanks Chris, yea I can see where your going with it and fully understand.

    I just thought there would be like a calculation. I am using the "set position to another object", with Image point, so I was presuming there was a calculation that could be done on the position of the moving object.

    You know like the image point is a moving point so would it not be plus one or something.

    Cheers John

  • I solved it, it needed to use "Set position" and then "position object" in that order, I had them the other way round, it works now!

    Thanks again Chris

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