logo
Main

Forums

Downloads

Unreal-Netiquette

Donate for Oldunreal:
Donate

borderline

Links to our wiki:
Wiki

Walkthrough

Links

Tutorials

Unreal Reference

Usermaps

borderline

Contact us:
Submit News
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Issue #66. Protracted and irrelevant player animations (Read 50 times)
Masterkent
Developer Team
Offline



Posts: 1050
Location: Russia
Joined: Apr 5th, 2013
Gender: Male
Issue #66. Protracted and irrelevant player animations
Jul 8th, 2018 at 12:13pm
Print Post  
Animations that could properly match the current behavior of a player can be superseded by gestures and crawling animation, resulting in weirdly looking things described below.

1. Skating.

This anomaly happens when a player repeatedly presses a taunt key responsible for playing gestures while moving. When the player is running, that looks like sliding over a surface. When the player is swimming, that looks like moving through a fluid by inertia without friction.

Additionally, playing a gesture animation suppresses all noises of steps when running - players won't hear footstep sounds and scripted pawns won't detect footstep-related noises.

2. Full-height crouching.

This anomaly happens when a player repeatedly presses a taunt key responsible for playing gestures while crouching. The crouching player appears to be using a standing posture. Full-height crouching can be combined with skating.

3. Protracted ducking animation.

This anomaly happens when a player releases a Duck key while moving. The running player keeps using a crouching posture for a while - until completion of the most recently played ducking animation. Before the crawling animation is finished, the player also has reduced eye height (the camera is closer to the ground when using the first-person view) and reduced exposure to shots.


Video: https://www.youtube.com/watch?v=aFp7mNyIb2w

Suggested resolution: change Engine.PlayerPawn as indicated below.

Code
Select All
exec function Taunt( name Sequence )
{
-	if ( HasAnim(Sequence) && GetAnimGroup(Sequence) == 'Gesture' )
+	if (HasAnim(Sequence) && GetAnimGroup(Sequence) == 'Gesture' &&
		!bool(Acceleration) && !bIsCrouching)
	{
		ServerTaunt(Sequence);
		PlayAnim(Sequence, 0.7, 0.2);
	}
}

function ServerTaunt(name Sequence )
{
-	if ( HasAnim(Sequence) && GetAnimGroup(Sequence)=='Gesture' )
+	if (HasAnim(Sequence) && GetAnimGroup(Sequence) == 'Gesture' &&
+		!bool(Acceleration) && !bIsCrouching)
	{
		PlayAnim(Sequence, 0.7, 0.2);
	}
} 


Code
Select All
function SwimAnimUpdate(bool bNotForward)
{
-	if ( !bAnimTransition && (GetAnimGroup(AnimSequence) != 'Gesture') )
+	if ( !bAnimTransition && (bool(Acceleration) || GetAnimGroup(AnimSequence) != 'Gesture') )
	{
		if ( bNotForward )
		{
			if ( GetAnimGroup(AnimSequence) != 'Waiting' )
				TweenToWaiting(0.1);
		}
-		else if ( GetAnimGroup(AnimSequence) == 'Waiting' )
+		else if ( GetAnimGroup(AnimSequence) == 'Waiting' || GetAnimGroup(AnimSequence) == 'Gesture' )
			TweenToSwimming(0.1);
	}
} 


In function PlayerWalking.ProcessMove:

Code
Select All
		if ( (Physics == PHYS_Walking) && (GetAnimGroup(AnimSequence) != 'Dodge') )
		{
			if ( !bIsCrouching )
			{
				if ( bDuck != 0 && TryToDuck(true) && IsInState('PlayerWalking') ) // Note: TryToDuck may change the state (e.g. to PlayerSwimming)
				{
					bIsCrouching = true;
					PlayDuck();
				}
			}
			else if ( bDuck == 0 && TryToDuck(false) )
			{
				OldAccel = vect(0,0,0);
				bIsCrouching = false;
+				if (bool(Acceleration))
+					TweenToRunning(0.1);
			}
 


(this fix is similar to the one used in UT)
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint
Bookmarks: del.icio.us Digg Facebook Google Google+ Linked in reddit StumbleUpon Twitter Yahoo