Hi list

I've asked this before but was ignored :( Can anyone please help me on
this issue?

I have animations in our mod that need to directly influence a
player's absorigin, for example a dash or roll or cartwheel, etc.
These animations are pretty sophisticated and don't look good if we do
QC root position extraction and fake it with a physics velocity push.
We actually want short -performances- for these player animations, ie:
like how Dog runs around attacking things in HL2, with the player
ending up in a different location than where he started.

Lacking any idea of how that's -normally- implemented, I've written
some pseudocode. Maybe some kind soul can point me to the right
direction?


---pseudocode---

StudioFrameAdvace(){

//...after all of valve's stuff...
  AppendAnimationOriginOffset()
}


AppendAnimationOriginOffset(){
  Vector currentSkeletonRootPosition = GetRootBoneOrigin()
  Vector lastSkeletonRootPostion = lastRootPosition;
  Vector delta = currentSkeletonRootPosition - lastSkeletonRootPosition
  Vector currentPlayerPosition = GetAbsOrigin()
  Vector futurePlayerPosition = currentPlayerPosition + delta;

  // make sure our animation offset isn't moving our player into walls
and things
  trace_t tr;
  traceLine( currentPlayerPosition, futurePlayerPosition + playerHull,
..., &tr, ...)
  if( tr.m < 1.0 )
    futurePlayerPosition *= m

  SetAbsOrgin( futurePlayerPosition )
}

---end pseudocode---


It seems that this method would need to predict this (I have
studioadvanceframe and predicted sequences implemented on both
client/server).

Then, it seems I might have to extract the skeleton root's animation
offset back out of the animation sequence itself, but from code not
from QC files (X,Y,Z commands).

Please help, thanks.

~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