Raised This Month: $ Target: $400
 0% 

Collision of two line


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
dFF
sıɹɹoɥɔ ʞɔnu
Join Date: Oct 2009
Old 06-23-2012 , 12:14   Collision of two line
Reply With Quote #1

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:
new Float:fStart// contain the start origin of RED LINE
new Float:fEnd// contain tha end origin of RED LINE

// I tried to calculate when red line is inside of  blue square
new Float:fTest]
fTest] = fStart] * fEnd] / fStart] - fEnd]
fTest] = fStart] * fEnd] / fStart] - fEnd]
fTest] = fStart] * fEnd] / fStart] - fEnd]
// but doesn't wok! 
Attached Thumbnails
Click image for larger version

Name:	square.PNG
Views:	292
Size:	1.5 KB
ID:	105471  

Last edited by dFF; 06-25-2012 at 10:32. Reason: update wrong information! sorry!
dFF is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:06.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode