Raised This Month: $ Target: $400
 0% 

Entity following attachment rather than another entity


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 05-01-2013 , 12:08   Entity following attachment rather than another entity
Reply With Quote #1

To make a hat stick to the player's head I'm using MOVETYPE_FOLLOW, which kind of works now, but not for what I'm going to do.

I've added a set of additional animations to the player's model, which don't change the player's origin (such as dancing; the model moves a few inches forward but the actual hitbox remains on the same spot).

The question is - is there a way to attach the hat entity directly to the bone, which is:
Quote:
Originally Posted by http://wiki.amxmodx.org/FakeMeta_Functions_Detailed_Descriptions#EngF unc_GetBonePosition
Bone 8 Name: "Bip01 Head"
Now I could probably get the attachment's origin with EngFunc_GetBonePosition and keep changing the hat's origin to it in PreThink, but as we all know that's pretty laggy unless on LAN server and doesn't look very great.

Creating a beam allows to select an attachment it will stick to in the message, but I haven't found a way to do this with an entity.

https://forums.alliedmods.net/archiv...p/t-59595.html


Thanks in advance.
Backstabnoob is offline
Sam Tsuki
Senior Member
Join Date: Apr 2008
Location: KoKoRo!
Old 05-01-2013 , 12:57   Re: Entity following attachment rather than another entity
Reply With Quote #2

I tried EngFunc_GetBonePosition but it doesn't work with animations
it just gets the bone position for frame 0
Does it work for u?
__________________
My Approved Plugins:
Sam Tsuki

HvM XP Mod's addons:
Co-op Maps
Money System
Sam Tsuki is offline
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 05-01-2013 , 13:28   Re: Entity following attachment rather than another entity
Reply With Quote #3

I haven't tried it yet, but if it doesn't work then there's probably no way to do it
Backstabnoob 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 23:46.


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