[Solved] Applying physics joints in-game?

0 favourites
  • 3 posts
From the Asset Store
Quickly and easily add a Quake-like console to your games
  • Hi there.

    So far using Construct I haven't found many things that I have not been able to figure out one way or another, but this has really got me confused.

    I've started a test of using physics constraints in-game, but I can't seem to get it working.

    Here are my problems so far:

    1. the normal physics constraints/joints rely on the use of image points, which means that they then can't be accurate to where one's mouse is pointing. I'm using the mouse to apply a nail object which - all going well - would allow the objects behind it to revolve around the point where the nail is. That doesn't work though, because the join is based on the image point as in the below screenshot.


    2. I can't use image points for so many reasons: it has to be accurate or the join won't look anything like it should, I would need to find the closest image point to the nail from both objects and compromise, and overall I don't really feel like adding another 2-10 image points for each of the objects I'll have.

    3. Pin doesn't work with physics behavior. I think this also because when I apply the pin, it tries to pin A to B and B to A again, and since I'm using one family/object to do this, I can't really - as far as I know - get around this.

    So I guess what it comes down to is: Using physics behavior, is there any way to stick things together.


  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Seems I fixed it (to an extent) and I'm not entirely sure how. Here's the updated nail constraint events:


    As you can see the only difference is that this means the nail attaches to the two objects rather than the two objects attaching to the nail. Also for some reason doing it in the same event (instead of separating the top and bottom instances) breaks it, in a way that it for some reason only attaches to one object.

    There's still the issue that this will only work with two objects (the top and bottom) but that can be fixed with a for loop:


    Now I just need to make a physics driven drag and drop system...

  • I will try to implement this later, I have been trying to figure out something similar.

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