# [Resolved]How to determine the point of collision

Get help using Construct 2

### » Fri Apr 18, 2014 11:04 pm

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,
Last edited by DoudouSupreme on Mon Apr 21, 2014 10:35 am, edited 1 time in total.
B
12
S
2
Posts: 85
Reputation: 899

### » Sat Apr 19, 2014 12:28 am

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.
B
43
S
12
G
6
Posts: 446
Reputation: 6,807

### » Sat Apr 19, 2014 1:45 am

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.
B
12
S
2
Posts: 85
Reputation: 899

### » Mon Apr 21, 2014 12:45 am

B
33
S
14
G
3
Posts: 801
Reputation: 6,316

### » Mon Apr 21, 2014 10:34 am

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.
B
12
S
2
Posts: 85
Reputation: 899