This article: http://udn.epicgames.com/Three/RootMotion.html
At the bottom is a code snippet that performs some operations that have changed in newer UDK versions and would be rejected by the compiler.
Namely:
got it's header changed toCode:simulated event OnAnimEnd(AnimNodeSequence SeqNode)
andCode:simulated event OnAnimEnd(AnimNodeSequence SeqNode, float PlayedTime, float ExcessTime)
are no longer possible because the array is declared to be constant in UnrealScript, so you have to use a native setter functionCode:// Turn on Root Motion on Animation node SeqNode.RootBoneOption[0] = RBA_Translate; SeqNode.RootBoneOption[1] = RBA_Translate; SeqNode.RootBoneOption[2] = RBA_Translate; […] // Discard root motion. So mesh stays locked in place. // We need this to properly blend out to another animation SeqNode.RootBoneOption[0] = RBA_Discard; SeqNode.RootBoneOption[1] = RBA_Discard; SeqNode.RootBoneOption[2] = RBA_Discard;
Also, why is that code accessing the mesh with Pawn.Mesh, despite the code already taking place in the Pawn class?Code:// Turn on Root Motion on Animation node SeqNode.SetRootBoneAxisOption(RBA_Translate, RBA_Translate, RBA_Translate); […] // Discard root motion. So mesh stays locked in place. // We need this to properly blend out to another animation SeqNode.SetRootBoneAxisOption(RBA_Discard, RBA_Discard, RBA_Discard);




Reply With Quote


Bookmarks