>
> Micheal, as you know I'm doing something rather similar. I've gotten it
> working reasonably well, but in truth I don't like the way I have it
> working. It's laggy and a bit jumpy, and plays terribly for players with
> latency more than 50. But I can basically show you how it works, here's the
> abridged version:
>

Jorge:
Dude thanks again for sharing the code. Much appreciated.

I've spent a good deal of time trying to get this to work the way I want.
There seems to be some oddities with GetIntervalMovement. When I print out
the deltas for newPosition - GetLocaPosition(), what appears to be happening
is that

1. When I'm not moving, the deltas are incorrect and extremely small.
2. When I'm pressing +forward the deltas are correct and the player animates
correctly.

What's the relationship with GetIntervalMovement and user commands? I've
traced all the lines of code with Studio_Seq stuff and nothing seems to care
about current speed or input. I'm at a total loss as to why
GetIntervalMovement would return different things based on whether or not
I'm trying to move!!



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

Reply via email to