Math Help
Code:
|
well depends on what u want to do. In the case that you specified, if you are simply finding a player between his aiming and his end aiming you can simply do get_user_aiming. If you are trying to find out if a player is on a line that is not from a player's crosshairs to a player's end aim point, you could circle through 1-get_maxplayers() and see if they are on the line with simple algebra.
|
Im trying to find out if the user is close to that line. Like in is_user_visible.
|
then y not use is_user_visible? maybe I am misunderstanding.
|
not working
|
I thought someone had told me one time that they had fixed it because instead of doing
Code:
if(!visible)Code:
if(!visible) |
So you want to find a distance from the closest line point to the player?
By the way is_in_viewcone and is_visible is broken (<1.75) but you can use fm_is_visible and fm_is_in_viewcone from the Fakemeta Utilities |
Code:
<Aim>I total forgot about your Fakemeta Utilities, going to try that.. |
atm i only know one way:
you have an triangle here. A = Attacker B = AIM C = VICTIM a = distance(aim, victim) b = distance(attacker, victim) c = distance(attacker, aim ) hc = distance from line to victim so something like this could work: s = (a+b+c)/2 area = sqrt(s *(s-a)*(s-b)*(s-c)) area = c * hc /2 hc = 2 * area / c maybe this is not the best way, but it is a way ;) |
|
| All times are GMT -4. The time now is 08:03. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.