[Resolved]How to determine the point of collision

0 favourites
  • 5 posts
From the Asset Store
Connect the dots in the correct order and draw happy animals!
  • Hi folks,

    I' m trying to determine the coordinates of the collision from one object with another, any idea how I can achieve that, is that possible? I'm not really good at maths so it might be feasible but not sure how.

    I want to spawn an object at this position but right now I only manage to create an object at the point of origin of the rectangle or at a point I manually create. Any help would be greatly appreciated!

    Cheers,

  • if the object moving (the circle) has frontal movement, you can add an image point on it's "nose", and spawn the new object from that, from the circle instead of the rectangle.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Unfortunately this is not what i'm trying to achieve. Basically, I'm drawing red lines from the center of the circle, which are for instance 128px long.

    On line of sight of an obstacle, they are supposed to change size, depending on the distance from the center and the point of collision with the rectangle.

    At thz moment I can't manage to determine the coordinates of that point of collision to recalculate the size of the red lines in real time.

  • may this help?

  • Thanks for the suggestion. I managed to do what I wanted using Sargas' suggestion in the end.

    Even though the line does not always have the same size, the image points move. So if the line size increases, the image point moves, which is what I wanted.

    So I managed to create an object at the coordinates the two object overlap.

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