Results 1 to 7 of 7

Thread: Landing "Delay"

  1. #1
    MSgt. Shooter Person
    Join Date
    Mar 2011
    Posts
    105

    Default Landing "Delay"

    I a trying to remove the "delay" when you land from a great height. Its as if it slows you down to simulate the bending of knees when one lands. I have been looking through UTPawn and UTPlayerController but have not managed to find anything related to it. I found a section about a double jump landing delay but that is not it as i do not have double jumps in my game.

    Any help will be appreciated.

  2. #2
    MSgt. Shooter Person
    Join Date
    Mar 2011
    Posts
    105

    Default

    Still struggling with this. I have been going through the Pawn Classes (UTPawn, UDKPawn, GamePawn and Pawn) and am still having great difficulty locating where this landing delay comes from. I have my own Event Landed function and even to be sure i have overloaded the TakeFallingDamage function, this ofcourse meant no falldamage but did not remove the landing delay. Any advice would be nice.

    Code:
    event Landed(vector HitNormal, actor FloorActor)
    
    {
    
            //Check If Landed
    
    	Super.Landed(HitNormal, FloorActor);
    
    
    
    
    
    	Velocity = Velocity;
    
    
    
    	if(!bHidden)
    
    	{
    
    	        //Play Landing Sound Effect
    
    		PlayLandingSound();
    
    	}
    
    	TakeFallingDamage();
    	if ( Health > 0 )
    		PlayLanded(Velocity.Z);
    	LastHitBy = None;
    
    
    
            //Reset Pawn Eye Height to Default
    
    	SetBaseEyeheight();
    
    	
    
    	CheckSlopeAndSpeed();
    
    }
    
    simulated function TakeFallingDamage()
    
    {
    
    
    
    }
    Any help is greatly appreciated.

  3. #3
    MSgt. Shooter Person
    Join Date
    Mar 2011
    Posts
    105

    Default

    Figured i'd rebump this as it's been so long since it was on the frontpage. I have pretty much scoured through all of the "*Pawn" files to find any reference to if it is lowering the velocity on landing from a certain height but have not managed to find anything.

    Wondering if anyone else has a clue about where to look or whether this is something that requires the engine source to modify.

  4. #4
    MSgt. Shooter Person
    Join Date
    Mar 2011
    Posts
    163

    Default

    The soft landing of UTPawn is managed in UpdateEyeHeight function (it also handles bob walking, weapon bobing, smooth walking down the stairs, etc...). What it actually does is soft EyeHeight transition, so the view is not jumpy, but soft.

    If you base your own Pawn on top of UDKPawn instead of UTPawn, then there is no soft landing and no bobing... You can also turn all off by overriding UpdateEyeHeight and leaving it empty but that would cause no smoothness for walking down/up the stairs and no more bob walking. Take a look inside that function and you will find out what to do to remove soft landing if that is your only goal.

  5. #5
    MSgt. Shooter Person
    Join Date
    Mar 2011
    Posts
    105

    Default

    I have tried to override UpdateEyeHeight in the past but decided to try it again off of your suggestion. This does not correct the players slow down upon landing.

    An example of what i am trying to remove can be seen in this video at approximately 10 seconds in.

    http://www.youtube.com/watch?v=eB_34w5ydM4

    As you can see when the player lands from a height the velocity counter at the bottom of the screen sharply drops too around 200 and then starts to rise again.

  6. #6
    MSgt. Shooter Person
    Join Date
    Mar 2011
    Posts
    105

    Default

    I figured I'd resurrect this thread as i am still trying to figure this puzzle out. I have had no luck in trying to figure out why my player is slowing down after a great fall.

  7. #7
    MSgt. Shooter Person
    Join Date
    Mar 2011
    Posts
    163

    Default

    Does your pawns velocity slows down after fall? I tested my game, that does not happen - velocity stays the same (in X and Y dirs).

    EDIT, checked event Landed in UTPawn:
    Code:
    	if ((MultiJumpRemaining < MaxMultiJump && bStopOnDoubleLanding) || bDodging || Velocity.Z < -2 * JumpZ)
    	{
    		// slow player down if double jump landing
    		Velocity.X *= 0.1;
    		Velocity.Y *= 0.1;
    	}
    Following condition makes the issue for you:
    Code:
    Velocity.Z < -2 * JumpZ
    If the Z velocity is more than twice the size of JumpZ, then the slowdown happens. So just override Landed event and should be fine
    Last edited by one1; 05-30-2011 at 09:34 PM.


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.