I've been trying different things now, but none of them work as they are
supposed to.

 

A combination of LookupAttachment and GetAttachment and setting the
origin and angles of the entity I want to attach to the player to what
GetAttachment returned followed by a call to FollowEntity does not help.
The entity seems to be glued to the players feet then.

Calling SetParent and afterwards SetParentAttachment yields better
results. The entity is shown on the attachment point and moves
completely relative to the player. The problem here is, that the weapon
is no longer in the player's hands and the whole player model jerks
around. Additionally the console prints the error message "*** ERROR:
Bone access not allowed (entity 1:player)". I tried to solve that by
calling PushAllowBoneAccess on the player (client side). Doesn't help,
the error message does not disappear and the player keeps on jerking
around.

 

Any ideas?

 

Jan

 

 

Von: hlcoders-boun...@list.valvesoftware.com
[mailto:hlcoders-boun...@list.valvesoftware.com] Im Auftrag von Cale
Dunlap
Gesendet: Mittwoch, 3. Oktober 2012 20:21
An: Discussion of Half-Life Programming
Betreff: Re: [hlcoders] Show a model on the player

 

I haven't personally done what you're trying to do, but perhaps looking
at bone followers would provide some insight. I'm not sure if they'll
address what you're asking. Other members of the list can correct me if
I'm wrong. I've actually been curious about this myself.

 

Cale

On Thursday, September 27, 2012, Jan Hartung wrote:

Hi,

 

I'm trying to render different items (models) on the player model. The
player model has been set up with various attachments where I could
render the items. My problem is that I couldn't find a way to attach an
item to any of the attachment points. The net doesn't really help with
this and I couldn't find the code used to show the weapons on the player
models. Any hints on how to render models on attachment points?

 

Jan

 

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
https://list.valvesoftware.com/cgi-bin/mailman/listinfo/hlcoders

Reply via email to