Announcement

Collapse
No announcement yet.

How to change UDK player height?

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

    How to change UDK player height?

    Hi, is there any way to change the UDK player height? I'm new to this so please explian in steps if you can.


    Is there any way to group 'Brushes' or 'Static Mesh' together as well? Thanks, V.

    #2
    The height of the player is defined inside the YourPawn.uc of your project. Simple change "Scale=1.25" to whatever you want, like so:

    Code:
    //Setting up the mesh and animset components
    
        Begin Object Class=SkeletalMeshComponent Name=InitialSkeletalMesh
                    CastShadow=true
                    bCastDynamicShadow=true
                    bOwnerNoSee=false
                    LightEnvironment=MyLightEnvironment;
           Scale=1.25                                                     // THIS LINE CHANGES THE HEIGHT
                    BlockRigidBody=true;
                    CollideActors=true;
                    BlockZeroExtent=true;
    //What to change if you'd like to use your own meshes and animations
                    PhysicsAsset=PhysicsAsset'CH_AnimCorrupt.Mesh.SK_CH_Corrupt_Male_Physics'
                    AnimSets(0)=AnimSet'CH_AnimHuman.Anims.K_AnimHuman_AimOffset'
                    AnimSets(1)=AnimSet'CH_AnimHuman.Anims.K_AnimHuman_BaseMale'
                    defaultAnimTree=AnimTree'CH_AnimHuman_Tree.AT_CH_Human'
                    AnimTreeTemplate=AnimTree'CH_AnimHuman_Tree.AT_CH_Human'
                    SkeletalMesh=SkeletalMesh'CH_IronGuard_Male.Mesh.SK_CH_IronGuard_MaleA'
            End Object
    //Setting up a proper collision cylinder
            Mesh=InitialSkeletalMesh;
            Components.Add(InitialSkeletalMesh); 
            CollisionType=COLLIDE_BlockAll
            Begin Object Name=CollisionCylinder
      CollisionRadius=+0030.000000               // You need to adjust this to fit your player model.
      CollisionHeight=+0062.000000               // You need to adjust this too to fit your player model.
            End Object
            CylinderComponent=CollisionCylinder
    }
    ^^ this part goes into your defaultproperties block


    And to group certain things together, all you need to do is select anything you want (remember to select brushes you need to hold ctrl+shift) then hover your mouse over a static mesh or if you only have selected brushes over an edge (kinda tricky) and right click. In the upcoming menu you will find a point called "Groups" thats all rest is up to you. Have fun hope it helps.

    And last but not least be sure to check out the documentation you will find lots and lots of useful informations about nearly anything you need to know! http://udk.com/documentation

    Comment


      #3
      Could you elaborate? Or help me too?

      "The height of the player is defined inside the YourPawn.uc of your project. Simple change "Scale=1.25" to whatever you want...
      -----------------------------------------------
      this part goes into your defaultproperties block"


      Could you please elaborate on the YourPawn.uc and the defaultproperties block?

      I too am in need of making my character slightly taller as he feels like a bit of a midget in the level - at the moment, I have no coding done for the level, it was just all built with the UDK editor, and I just want a quick fix to make him slightly taller... it shouldn't be too difficult should it?

      I just don't know anything about "YourPawn.uc" and the "defaultproperties block"... Thanks!

      Comment


        #4
        Sorry for the bump of the topic but the answer hasn't been given. Does anyone know ?

        There is obviously the command ChangeSize [INT] but, with that command, the character's width is too large :/

        Comment


          #5
          Just search on google, there you will find many many answers

          Comment


            #6
            Originally posted by fighter5347 View Post
            Just search on google, there you will find many many answers
            isn't it ironic that this is the top search result for said search?

            Comment


              #7
              You just want to change the pawn's mesh's Z scale? Grab the X and Y from the pawns current X and Y scale, but alter the Z how ever you'd like.

              var vector boop;

              boop = pawn.mesh.scale3d;
              boop.z += NewHeight;

              Pawn.Mesh.SetScale3D(boop);

              Note that this does not affect the collision height, to do that you'd have to change the collision height in a similar fashion.

              Comment


                #8
                What i think he is looking for is a simple button or similar in the UDk editor that will change the draw size of the player character. as mentioned before with the scale comment.. you either have to make your own pawn class or edit the UT pawn class or as bwhit stated you can do it that way with code aswell.... alternately you can make your own character in your choice of 3d programs and make it a little bigger. If you want an easy editable solution in the editor i suppose you could archtype the pawn class and make a variable for the drawscale that could be edited within the editor..

                Comment


                  #9
                  Hey, so what's the height in Unreal Units that the base player pawn holds?

                  Comment


                    #10
                    You can change any property such as scale, viewheight, mesh, materials etc of things like player pawns directly in the editor in real time if you understand how to leverage the power of kismet.
                    Please read my tutorial articles on the subject here: http://unrealdb.com/the-hidden-powers-of-kismet/

                    Comment

                    Working...
                    X