Raised This Month: $ Target: $400
 0% 

Get gun's barrel origin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
addicted2sex
Senior Member
Join Date: May 2009
Location: localhost
Old 02-18-2016 , 15:55   Get gun's barrel origin
Reply With Quote #1

How can I get the the gun's barrel end vector coordinates (origin) ? Any ideas ?
__________________
Let 7he gr0ovE r3Lease y0ur m!nd

Last edited by addicted2sex; 02-19-2016 at 18:21.
addicted2sex is offline
NiHiLaNTh
Way Past Expiration
Join Date: May 2009
Location: Latvia
Old 02-20-2016 , 06:53   Re: Get gun's barrel origin
Reply With Quote #2

what exactly are you trying to achieve? If you need to emit a laser from the gunpoint, than you can use TE_BEAMENTPOINT and use id|0x1000 as start entity, which is the precise origin of the gunpoint.
If you need to retrieve the origin itself, than take a look at this post. But in this case you have to calculate start position manually for all weapons + if user has 'cl_righthand 0' than some bugs will appear.
__________________

NiHiLaNTh is offline
Send a message via Skype™ to NiHiLaNTh
addicted2sex
Senior Member
Join Date: May 2009
Location: localhost
Old 02-20-2016 , 09:09   Re: Get gun's barrel origin
Reply With Quote #3

Quote:
Originally Posted by NiHiLaNTh View Post
what exactly are you trying to achieve? If you need to emit a laser from the gunpoint, than you can use TE_BEAMENTPOINT and use id|0x1000 as start entity, which is the precise origin of the gunpoint.
If you need to retrieve the origin itself, than take a look at this post. But in this case you have to calculate start position manually for all weapons + if user has 'cl_righthand 0' than some bugs will appear.
I need to check whether I see or not the other player's gun barrel. So I need an algorithm to calculate the point coordinates to the gun's barrel (something like in block wallhack plugin, but they're not calculated correctly there). And without using get_user_origin() with mode 3
__________________
Let 7he gr0ovE r3Lease y0ur m!nd

Last edited by addicted2sex; 02-20-2016 at 09:12.
addicted2sex is offline
Reply



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 07:31.


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