Announcement

Collapse
No announcement yet.

Adventure Kit

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #46
    Thank you for looking into it.

    Originally posted by FTC View Post
    Hi,
    @clayblaze:
    1) You can make the camera use a socket as its root instead, open the AdvKitCamera and change the line

    Note, however, that this is an unsafe cast, just for the sake of getting it to work. You'll want to put in some more ifs to check for null references to avoid errors. By default the camera follows the rootbone when the character is in RootMotion, so a skipping camera means your root bone does not smoothly translate to its destination, but instead jumps at the end, right?
    Hm, I guess the camera socket is a more general topic, but it came up as I was working on the vault anim, so sorry for fixating... anyway, here's what i've been thinking... by default, the yellow dude pawn can vault onto a block of 64 units (if I recall); but if the root bone animation goes slighly higher than the specified 64 units, he will fall down a unit or two once the vault animation is finished, and the camera will follow.
    However when you add advanced foot placement, you kind of free your character from the root bone, making them actually stand on their legs, even if the root is animated to travel higher or lower than the target surface is - that can minimize the skip on the mesh's part. The camera, however, is bound to root, which is still about to fall down that inch or two, causing that skip.
    Most example UDK character rigs do have a camera socket, so I thought that might be among what it's for :]

    My vaulting animation (and likely a lot of future ones) does have some peculiar root motion (done so that legs don't go too crazy due to IK solvers hitting new surface), which in turn causes not such great camera movement. With camera freed from root, seems no longer a problem

    Thanks again.

    Comment


      #47
      Awsome ! ,that code is juicy

      Thanks for sharing this will help a lot of people to understand how to make a free running system i guess .

      Comment


        #48
        hi, not that familiar with udk coding, just wondering if there is a way of implementing this with the original udk game code so as i can have a weapon also.
        Alternatively how can i impliment weapons to your kit?
        cheers

        Comment


          #49
          Hello, I have a short question.

          How can I connect Last LedgeClimb Actor to a First one, for example, around four edges of a cube? I found that they have Prev and Next references, but they are always empty (None), and assigning them not makes difference. What's the solution?

          And Another one, I found that sometimes pawn stucks on a ledge, when I press C to jump down, it falls but immediately grabs the ledge again.

          Comment


            #50
            Hi,

            @clayblaze:
            I got the jumping to lerp, but you have to do some changes:

            1) Add
            Code:
            var bool bRotateWhileJumping;
            to the AdvKitPawn somwhere within the variable block.

            2) Add
            Code:
            event HitWall( vector HitNormal, actor Wall, PrimitiveComponent WallComp )
            {
            	super.HitWall(HitNormal,Wall,WallComp);
            	bRotateWhileJumping=false;
            }
            to the AdvKitPawn below the variable block.

            3) Find the DoJump function and replace
            Code:
            	case EAS_Default:
            		//rotate pawn to acceleration and then use the regular jump function
            		vXYAccel = Acceleration;
            		vXYAccel.Z = 0;
            		if(VSize(vXYAccel)!=0)
            		{
            			SetRotation(Rotator(vXYAccel));
            		}
            		return super.DoJump(_bUpdating);
            with
            Code:
            	case EAS_Default:
            		//rotate pawn to acceleration and then use the regular jump function
            		vXYAccel = Acceleration;
            		vXYAccel.Z = 0;
            		if(VSize(vXYAccel)!=0)
            		{
            			bRotateWhileJumping=true;
            		}
            		return super.DoJump(_bUpdating);
            4) Finally open the AdvKitController and find the first UpdatePawnRotation function. Replace it with:
            Code:
            function UpdatePawnRotation(float _fDeltaTime)
            {
            	local Vector vDirection;
            
            	//rotate the pawn only if it is not in the air
            	if(Pawn.Physics != PHYS_Falling)
            	{
            		//only rotate around the Z axis
            		vDirection = Pawn.Acceleration;
            		vDirection.Z = 0;
            
            		//only rotate if the Pawn is actually being accelerated, 
            		//otherwise Rotator(vDirection) will be rot(0,0,0)
            		if(VSize(vDirection)>0)
            		{
            			Pawn.SetRotation(RLerp(Pawn.Rotation,Rotator(vDirection),FMin(_fDeltaTime*advPawn.fRotationLerpSpeed,1),true));
            		}
            	}
            	else if(AdvKitPawn(Pawn).bRotateWhileJumping)
            	{
            		//only rotate around the Z axis
            		vDirection = Pawn.Velocity;
            		vDirection.Z = 0;
            
            		//only rotate if the Pawn is actually being accelerated, 
            		//otherwise Rotator(vDirection) will be rot(0,0,0)
            		if(VSize(vDirection)>0)
            		{
            			Pawn.SetRotation(RLerp(Pawn.Rotation,Rotator(vDirection),FMin(_fDeltaTime*advPawn.fRotationLerpSpeed,1),true));
            		}
            	}
            }
            The pawn should now rotate into the direction that it jumps in. The HitWall check is necessary because otherwhise the pawn might drift along a wall and e.g. not grab ledges.

            @ssadrummer:
            Implementing the UDK weapons will require a lot of rewriting. I have not attempted it, nor have I much experience with weapons, so I cannot tell you how to do it.

            @krone128
            Kevin made a tutorial on how to create the ledge actors, which you can find here:
            http://www.youtube.com/watch?v=RzpZq...ijjJZz&index=3

            As for the fall down problem: Do you use any custom assets or does it happen on the example map? If so, could you specify where?

            greetings

            Comment


              #51
              Thanks FTC, works nicely

              http://www.youtube.com/watch?v=6yLQn2hlc7s

              Comment


                #52
                FTC, thanks, but disregard that, I'm already made vaults for my own pawn. Your source was helpful. Really, thanks a lot.
                Now making ropesliding, lol.

                Comment


                  #53
                  Hi. I have another question possibly related to root motion.

                  I'm trying to make my own "LedgeClimb_Wall_JumpDown" animation, but however I try to animate my root, the game just doesn't seem to play it back; when I try to drop down from a ledge, the animation plays as if root motion were discarded, and my character freezes.

                  I tried to play with fLedge variables in AdvKitPawn, thinking they may be dependant on collision cylinder size (mine is 12x38) like in the case of vaulting, but I don't understand what each of them really does, and had no kind of luck with it anyway.

                  Any ideas what could be wrong?

                  Thanks.

                  /edit

                  I just realized krone128 reported much the same thing, sorry.

                  Comment


                    #54
                    Hello.
                    Is this Adventure Kit works with foot placement ?
                    Because when I trying to add this, character falls (I used UDN script).

                    Comment


                      #55
                      @ wiNt

                      Try the code from the link I posted a few replies up. It has some improvements over the UDN one.




                      as for my problem... I still have no idea what could be wrong.

                      Here's my problem; my character grabs ledges, but is only able to let go if there's no wall under her feet:
                      http://youtu.be/22aVyLzjUeY


                      At first I didn't understand what traces were and what the offsets do, but with some trial and error I think I got some vague understanding what each of the AdvPawn Ledge vars do... so then I tried to modify them taking my collision cylinder size in consideration (12x38), to have the game place it in the same spot against ledge actors, as the default pawn cyllinder (15x49) is placed. No luck.

                      Then I tried replicating the error using default content; I removed all the stuff I made or modified, and reverted all AdvKit stuff to vanilla state. I tried fiddling with pawn cyllinder size and ledge variables, it made some mess, but the default pawn still jumped off ledges no problem.
                      I tried unplugging all the animations from the anim tree, to which my character doesn't yet have her own counterparts, basically everything but holding onto the ledge anim and letting go off of it was unplugged, and still it worked!


                      I went back to my own content, only this time I disabled foot placement, as it was the only difference I could see left between default pawn and my character, but still no change.

                      The placeholder anim is just a simple translation of the root bone, and still the only thing I can think of now, is that there's something wrong with the anim sequence itself. But then why does it work in "no wall" conditions?
                      Normally I use 3DS Max 2010, so I thought it may be an issue with outdated FBX exporter, but when I exported from 3DS 2013 it still gave the same result.

                      Comment


                        #56
                        @clayblaze

                        Still same thing. I trying to mess with "DefaultProperties" - I bet this is the thing which I can't solve.
                        Would you be so nice and send me your "DefaultProperties" lines here or on private message ?

                        //// about your problem
                        You checked if it's not different animations ? Since if you don't have any animation set, character just bugging (maybe you know this already but I trying to help you).

                        Comment


                          #57
                          Here's my default properties down to where specific Adventure Kit stuff lies. Sorry if it's a mess, I'm a copypaste monkey.

                          Code:
                          DefaultProperties
                          {
                          
                          	////FOOT PLACEMENT
                          	LeftFootSocketName="LeftFootSocket"
                          	RightFootSocketName="RightFootSocket"
                          	FootTraceRange=68.f  //68.f
                          	Physics=PHYS_Falling
                          	TickGroup=TG_PreAsyncWork
                          	////
                          	
                          	
                          		
                          	Begin Object Class=DynamicLightEnvironmentComponent Name=DynamicLightEnvironment
                          	
                          		bSynthesizeSHLight=False
                          		bIsCharacterLightEnvironment=TRUE
                          		bUseBooleanEnvironmentShadowing=FALSE
                          		InvisibleUpdateTime=1
                          		MinTimeBetweenFullUpdates=.2
                          	End Object
                          	
                          	Components.Add(DynamicLightEnvironment)
                          	LightEnvironment=DynamicLightEnvironment
                          	
                          	Begin Object Class=SkeletalMeshComponent Name=InitialSkeletalMesh	
                          		bCacheAnimSequenceNodes=FALSE
                          		CastShadow=true
                          		bOwnerNoSee=false
                          		LightEnvironment=DynamicLightEnvironment
                          				
                          		BlockRigidBody=false;
                          		CollideActors=false;
                          		BlockZeroExtent=false;
                          		
                          		bPerBoneMotionBlur=true
                          		
                          				
                          	
                          						
                          		/*
                          		CastShadow=true
                          		bCastDynamicShadow=true
                          		bAcceptsDynamicDominantLightShadows=True
                          		bAcceptsLights=True
                          		bAcceptsDynamicLights=True
                          		bOwnerNoSee=false
                          		LightEnvironment=MyLightEnvironment;
                          		BlockRigidBody=false;
                          		CollideActors=false;
                          		BlockZeroExtent=false;
                          		*/
                          			
                          		AnimSets(0)=AnimSet'evil_vic.vic_mesh_root_Anims' 
                          		AnimTreeTemplate=AnimTree'evil_vic.Animtree_Adv_Vic'	
                          		SkeletalMesh(0)=SkeletalMesh'evil_vic.vic_mesh'
                          		PhysicsAsset=PhysicsAsset'evil_vic.vic_mesh_root_Physics'
                          		
                          		////FOOT PLACEMENT
                          		Translation=(Z=40.25)
                          		////
                          		
                          		
                          		/*
                          		AnimSets(0)=AnimSet'AdvKit_Pawn.AS_AdvKit_Pawn'
                          		AnimTreeTemplate=AnimTree'AdvKit_Pawn.AT_AdvKit_Pawn'
                          		SkeletalMesh(0)=SkeletalMesh'AdvKit_Pawn.SK_AdvKit_Pawn'
                          		PhysicsAsset=PhysicsAsset'AdvKit_Pawn.PA_AdvKit_Pawn'
                          		
                          		Scale = 13
                          		*/		
                          		
                          	End Object
                          
                          	
                          	Mesh=InitialSkeletalMesh;
                          	Components.Add(InitialSkeletalMesh); 
                          	
                          	//DefaultMeshScale=1.075
                          	//BaseTranslationOffset=6.0
                          	
                          	CollisionType=COLLIDE_BlockAll
                          
                          	Begin Object Name=CollisionCylinder
                          		CollisionRadius=12			//15
                          		CollisionHeight=38			//49
                          		//BlockNonZeroExtent=true
                          		//BlockActors=true
                          		//CollideActors=true
                          		
                          		
                          		//CollisionRadius=12
                          		//CollisionHeight=38
                          		
                          	End Object
                          	CylinderComponent=CollisionCylinder
                          	CollisionComponent=CollisionCylinder
                          	
                          	/*
                          	Begin Object Name=CollisionCylinder
                          		CollisionRadius=15
                          		CollisionHeight=49
                          	End Object
                          	CylinderComponent=CollisionCylinder
                          	CollisionComponent=CollisionCylinder
                          	*/
                          	
                          	//fRotationLerpSpeed = 10
                          	fRotationLerpSpeed =2.5 //2.25 // 2.75
                          	fFloorTraceLength = 55
                          	//Sliding
                          	fSlideTraceLength = 128
                          
                          	bAlwaysEncroachCheck = true
                          
                          	WalkingPct=0.333
                          	GroundSpeed=108
                          	AccelRate=128 //256 //352
                          	//464
                          	MaxStepHeight=18
                          	//bAvoidLedges=false
                          	//bStopAtLedges=false
                          	bCanWalkOffLedges=true
                          	bAllowLedgeOverhang=true
                          
                          	
                          	
                          	
                          
                          	}
                          I adjusted Translation Z by 40.25 as well as my skeletal mesh origin in Animset Editor to compensate back, because my character and collision were appearing in weird places.

                          Comment


                            #58
                            @clayblaze

                            Thank you! Also, did you mess with some other things ?
                            Because after adding your DefaultProperties, character is just walking / idle.
                            I replaced character of course. Also I'm not sure if foot placement work because character still is "sliding" and even when he is in idle, his legs slides on ground (maybe it's caused of animation).

                            Comment


                              #59
                              Well these codes only make the characters adjust legs vertically, so they don't look too weird standing on slopes, it's not like in eg. Source Engine, where there's some semblence of footstep prediction. Kinda blows really, I want something like Euphoria to be in UDK.
                              Can you upload your pawn file? Like I said, I just copy/paste stuff into categories I find em in, then just futz with numbers and stuff. But maybe I'll be able to spot the issue that way.

                              Comment


                                #60
                                I still can't make the cam zoom on the character when a wall is between the player and the

                                I got this code from the GOW third person cam tutorial, but I don't know where will I place it

                                //This determines if the camera will pass through a mesh by tracing a path to the view target.
                                HitActor = Trace(HitLocation, HitNormal, Pos, Loc, FALSE, vect(12,12,12));
                                //This is where the location and rotation of the camera are actually set
                                _OutVT.POV.Location = (HitActor == None) ? Pos : HitLocation;
                                _OutVT.POV.Rotation = Rot;

                                Comment

                                Working...
                                X