If you want to get the location of an attachment on the player its exactly the same procedure as in the first person ragdoll code, you just use a pointer to the player class, etc:
(from inside say HL2_Player.cpp) CBasePlayer *pPlayer = (CBasePlayer *)this; Vector eyeOrigin, eyeAngles; pPlayer->GetAttachment( pPlayer->LookupAttachment( "eyes" ), eyeOrigin, eyeAngles ); - Jed On 14/01/2008, Ryan Nash <[EMAIL PROTECTED]> wrote: > -- > [ Picked text/plain from multipart/alternative ] > I am trying to get the player's body model to display while in first person > mode. I have accomplished the basics of this by making > ShouldDrawLocalPlayer() return true all the time. I have the player model > set up to be the alyx model. > > In game I spawn inside her head. If I look down I can see the full model but > it is from the inside so obviously not what I want. Instead I've figure if > I attach the player's view to the model's eye's it should accomplish what I > want. > > I admit I am not to versed in the SDK but I've been digging around through > many files and have figured the way to do this is altering what the > EyePosition( ) function returns in playerbase_shared.cpp. EyePosition( ) is > used in CalcPlayerView( ) to copy to the eyeOrigin vector which should get > the job done. > > So in looking through the ( > http://developer.valvesoftware.com/wiki/First_Person_Ragdolls) First Person > Ragdolls tutorial from the wiki I am thinking I could use a similar > approach. However, I am not sure how to get the player model's eye > attachment. They use m_hRagdoll so I assume m_hRagdoll is a global variable > to the C_HL2MP_Player class. What would the variable for the player's model > be? Is there one? > > Thanks in advance > > -ryan nash > -- > > _______________________________________________ > To unsubscribe, edit your list preferences, or view the list archives, please > visit: > http://list.valvesoftware.com/mailman/listinfo/hlcoders > > _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders

