Raised This Month: $ Target: $400
 0% 

Get entity user is aiming at (Not Solid one)


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-13-2011 , 17:04   Re: Get entity user is aiming at (Not Solid one)
Reply With Quote #4

Quote:
Originally Posted by Owyn View Post
what entity?

it can be player or some random rare map entity, but in 99% there would be no entity that could be hit.

maybe did you mean End origin of a traceline which represents the hit of the wall?

no really, what entity?
When you start, get the player's eyes origin, and then do an aim vector for 9999 units.
Do a trace line, and store the end position as the player's aim origin.
Also, check that trace line to see if it hit an entity. (<--- THAT ENTITY, doesn't matter what entity it is, could also hit nothing!)
Then you will be doing your sphere checks from the eyes origin to the aim origin.


Quote:
Originally Posted by Owyn View Post
thought about that, so for 900 units distance traceline i need to call find_ent_in_sphere() 30 times each of 30 units radius plus calculatie start origins for each sphere?
Yes.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] 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 03:22.


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