Hello. I'm doing some camera stuff in Source, where an entity will temporarily 
take control of the player's view for opening a door. We have a 
point_viewcontrol hooked up to a prop_dynamic which animates the camera from 
the prop's attachment point. This works perfectly fine.
However, I wish to blend the current player view angles to the entity 
attachment's angles before the animation starts so it smoothly transitions from 
player view to point_viewcontrol view. The blend happens, but it blends to the 
wrong angles (0, 180, 0)
My code is almost 100% identical to the blending code for the vehicle code 
which does perfectly blend the player view to the vehicle's attachment. It's 
placed in C_BasePlayer::CreateMove just above the vehicle blending code. My 
code:
        if (m_hViewEntityTest)  {               if (m_bBlendView == false)      
        {                       m_bBlendView = true;                    
m_flViewAngleDeltaTime = gpGlobals->curtime + 0.75;             }
                C_BaseAnimating *pAttacher = 
m_hViewEntityTest->GetBaseAnimating();
                if ( pAttacher )                {                       if ( 
m_flViewAngleDeltaTime > gpGlobals->curtime )                      {            
                   // Blend the view angles.                               int 
eyeAttachmentIndex = pAttacher->LookupAttachment( "vehicle_driver_eyes" );      
                    Vector vehicleEyeOrigin;                                
QAngle vehicleEyeAngles;                                
pAttacher->GetAttachmentLocal( eyeAttachmentIndex, vehicleEyeOrigin, 
vehicleEyeAngles );                                                QAngle 
outAngles;                               InterpolateAngles( pCmd->viewangles, 
vehicleEyeAngles, outAngles, 0.03 );                               
pCmd->viewangles = outAngles;                           engine->SetViewAngles( 
pCmd->viewangles);                       }               }       }
Does anyone have any ideas why it is not blending to the prop's attachment 
angles?
Thanks!James

                                          
_______________________________________________
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