Raised This Month: $ Target: $400
 0% 

client's head origin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
allenwr
Veteran Member
Join Date: Jan 2006
Location: The place where the karm
Old 09-05-2008 , 18:59   client's head origin
Reply With Quote #1

does anyone know the z-axis offset for a standard player model's head?
__________________
Don't ever place an order with Vee Servers. This is why.
allenwr is offline
Send a message via ICQ to allenwr Send a message via Yahoo to allenwr
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 09-05-2008 , 19:28   Re: client's head origin
Reply With Quote #2

My guess:
Code:
new Float:head[3]; new Float:origin[3], Float:maxs[3]; pev(client, pev_origin, origin); pev(client, pev_maxs, maxs); head[0] = origin[0]; head[1] = origin[1]; head[2] = origin[2] + maxs[2] - 16.0; // head is the origin of the head

However, this is only an estimate, and not an exact answer.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
minimiller
Veteran Member
Join Date: Aug 2007
Location: United Kingdom
Old 09-05-2008 , 19:34   Re: client's head origin
Reply With Quote #3

theres a file on XJ somewhere which tells u the units of a player model
I dont have it on this computer but ill search for it 2moro if u still need it
Sleepy time for me now
__________________
minimiller is offline
Send a message via MSN to minimiller
Emp`
AMX Mod X Plugin Approver
Join Date: Aug 2005
Location: Decapod 10
Old 09-05-2008 , 19:39   Re: client's head origin
Reply With Quote #4

Code:
engfunc(EngFunc_GetBonePosition, target, bone, origin, angles)
Bone 8 Name: "Bip01 Head"

So I would assume:
Code:
new Float:HeadOrigin[3], Float:HeadAngles[3];
engfunc(EngFunc_GetBonePosition, id, 8, HeadOrigin, HeadAngles);
if you really need the z-axis offset only, then just:
Code:
new Float:origin[3];
pev( id, pev_origin, origin );
new Float:offset = floatabs( HeadOrigin[2] - origin[2]);

Last edited by Emp`; 09-05-2008 at 19:44.
Emp` is offline
Send a message via AIM to Emp` Send a message via MSN to Emp` Send a message via Yahoo to Emp` Send a message via Skype™ to Emp`
allenwr
Veteran Member
Join Date: Jan 2006
Location: The place where the karm
Old 09-05-2008 , 20:37   Re: client's head origin
Reply With Quote #5

Looks like I am finally going to learn fakemeta.

Thank you Emp`, in return old song http://gprime.net/flash.php/youareapirate
__________________
Don't ever place an order with Vee Servers. This is why.
allenwr is offline
Send a message via ICQ to allenwr Send a message via Yahoo to allenwr
Prajch
Senior Member
Join Date: Dec 2007
Location: anger++
Old 09-05-2008 , 20:53   Re: client's head origin
Reply With Quote #6

If you just wanna know how high the model extends above the origin, it's 32 units. If you want their view origin...

PHP Code:
 new Float:userOrigin[3], Float:originOffset[3]
 
 
pev(idpev_originuserOrigin)
 
pev(idpev_view_ofsoriginOffset)
 
 new 
Float:viewOrigin[3]
 
viewOrigin[0] = userOrigin[0] + originOffset[0]
 
viewOrigin[1] = userOrigin[1] + originOffset[1]
 
viewOrigin[2] = userOrigin[2] + originOffset[2
Prajch is offline
allenwr
Veteran Member
Join Date: Jan 2006
Location: The place where the karm
Old 09-07-2008 , 01:55   Re: client's head origin
Reply With Quote #7

Quote:
Originally Posted by Emp` View Post
Code:
engfunc(EngFunc_GetBonePosition, target, bone, origin, angles)
Bone 8 Name: "Bip01 Head"

So I would assume:
Code:
new Float:HeadOrigin[3], Float:HeadAngles[3];
engfunc(EngFunc_GetBonePosition, id, 8, HeadOrigin, HeadAngles);
if you really need the z-axis offset only, then just:
Code:
new Float:origin[3];
pev( id, pev_origin, origin );
new Float:offset = floatabs( HeadOrigin[2] - origin[2]);
Where can I find this information on the functions, i tried the online func area and the .inc files and haven't found it.
__________________
Don't ever place an order with Vee Servers. This is why.
allenwr is offline
Send a message via ICQ to allenwr Send a message via Yahoo to allenwr
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 09-07-2008 , 03:59   Re: client's head origin
Reply With Quote #8

Those info about bone? You can find them by opening a model in HLMV(Half-Life Model Viewer) the go to Options -> Dump Model Info.
Alka is offline
allenwr
Veteran Member
Join Date: Jan 2006
Location: The place where the karm
Old 09-07-2008 , 16:12   Re: client's head origin
Reply With Quote #9

Not just bone info, but also the format on the function, i tried funcwiki and the inc files.

The funcwiki for fakemeta isn't like any other module so I am having a hard time learning.

what version of hlmv do you have? the one i have does not have the model info.
__________________
Don't ever place an order with Vee Servers. This is why.

Last edited by allenwr; 09-07-2008 at 16:15.
allenwr is offline
Send a message via ICQ to allenwr Send a message via Yahoo to allenwr
Alka
AMX Mod X Plugin Approver
Join Date: Dec 2006
Location: malloc(null)
Old 09-08-2008 , 01:51   Re: client's head origin
Reply With Quote #10

Jed's v1.35.
What function...? EngFunc_GetBonePosition ? -> http://www.amxmodx.org/funcwiki.php?go=module&id=16 .There you have all funcs with params.

Last edited by Alka; 09-08-2008 at 02:02.
Alka 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 03:13.


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