How to bond together 2 moving objects?

0 favourites
  • 5 posts
From the Asset Store
Welcome! I-Spy (Hidden objects) is an educational puzzle that is more than just seek-and-find activities.
  • Hello. My name is Cosmin and I am relative new on this forum.

    I am making a physics game and I have a little problem.

    In one of a scenery, one objects(let's call it A) need to stay on top of a sine platform( not platform behavior, just platform and let's call it B)

    The B object will move from left to right and reverse. The A object stay on B object. Since it is a physics game, both object has physic behaviors.

    The problem is that: The objects are not bonded perfectly together, there are some little movement between them. The A object slide backwards in relation with the B object, when B object is moving.

    Can anyone give me some ideas how to fix this?

    Thank you very much

    Cosmin

  • You could try something like:

    A is overlapping B at offset Y(10)

    Every Tick, set A x pos to B x pos

  • If you give your objects physics behaviour they will act with physics. You can't give them physics and then expect them to move in a non-physics way. Physics behaviours do not work with non-physics movement like Sine.

  • I understand and I know they will act with physics behavior. The problem is that after they interact, the movement between those objects didn't stop, it doesn't matter how much I change the friction amount.

    I tried even to disable the physic behavior and enable the platform behavior after they collide. It work but I can't reverse this. I mean when I want to change back from platform behavior to physic behavior, it stay in the platform behavior.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You could try something like:

    A is overlapping B at offset Y(10)

    Every Tick, set A x pos to B x pos

    Unfortunately every thick is a condition, not an action

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