Announcement

Collapse
No announcement yet.

Find Coordinates of Exit Point

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Find Coordinates of Exit Point

    I'm trying to make a bullet penetration system. Taking a look at the picture below could help explain what I want better.

    Click image for larger version

Name:	1Eftw.png
Views:	12
Size:	59.3 KB
ID:	1490153


    If we know the coordinates of a square shape as well as AB vector with direction coefficient, how do we find X,Y for C point?

    Basically I'm trying to find the X,Y coordinates of the point of the opposite side of an object of another point. As you can see I'm not exactly going for realism as it's linear. Below are a couple more examples to clarify my objective.
    Click image for larger version

Name:	lzkSZ.png
Views:	7
Size:	27.6 KB
ID:	1490154Click image for larger version

Name:	HB7eQ.png
Views:	9
Size:	30.5 KB
ID:	1490155


    This is for a 2D environment. I'm aware of the Raycast event but the thing is I can't seem to find where I could retrieve the value I'm going for as stated above.

    Any help is greatly appreciated

    #2
    Since you know DF and AB, you will know the angle of alpha, and since alpha equals to alpha', and you know the length of BB', you will know the length of B'C.
    Thus you can know the XY of C.

    I am not sure about the non-rectangle case, but I think it will be similar.

    Comment

    Working...
    X