Collision of two line
1 Attachment(s)
How to check if the red line collison the blue square / is inside of blue square.
Blue square created in player spawn origin. I have this datas value for red line: PHP Code:
|
Re: Collision of two line
If you are talking about tracelines... you should read this.
|
Re: Collision of two line
Too bad :(
I found a math calculation http://local.wasp.uwa.edu.au/~pbourk...try/planeline/ , but my knowledge is poor :(. |
Re: Collision of two line
xs_plane_rayintersect()
|
Re: Collision of two line
Exolent when you have time, can you write an example or tutorial ? Thank you!
|
Re: Collision of two line
The blue box is your plane. You can create the plane variable by using 3 points of that box.
Code:
Then you need the start position of the line and the direction it goes. If all you have is 2 points, then you need to calculate the direction. Code:
Finally, apply variables to check if the line intersects the plane. Code:
|
Re: Collision of two line
Thank you Exolent ! You are the man :mrgreen:.
|
| All times are GMT -4. The time now is 06:06. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.