This method won't work if your animations are "in-place" (ie. the
animations are within a predefined bounding box).
>
> You could get a bone position (spine bone perhaps) and save that, and frame
>
>> by frame compare the distance the bone traveled to get a velocity from that
>> and apply it to the player. Maybe this isn't what you want thought. ;)
>>
>>
>>
> Ryan:
>
> I spent about a minute sketching this out not expecting it to work and not
> surprisingly it didn't.
>
> int boneNum = player->LookupBone("ValveBiped.Bip01_Pelvis");
> if(boneNum==-1)
> return;
>
> Vector bonePos;
> QAngle boneAngle;
> player->GetBonePosition(boneNum, bonePos, boneAngle);
>
> if(lastBonePos == vec3_origin){
> lastBonePos = bonePos;
> return;
> }
>
> Vector delta = bonePos-lastBonePos;
> mv->m_vecVelocity = delta/gpGlobals->frametime;
> lastBonePos = bonePos;
>
> What would be the right approach to this? This doesn't seem right at all.
>
>
> Thanks for your patience guys. I guess I'm trying to do something that's not
> very common in Source so there's not much documentation on this at all :|
>
> ~M
> _______________________________________________
> 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