Page 5 of 5 FirstFirst ... 345
Results 161 to 178 of 178
  1. #161
    MSgt. Shooter Person
    Join Date
    Jul 2010
    Location
    England, Kent, Longfield, New Ash Green
    Posts
    356
    Gamer IDs

    Gamertag: Hitman Spitfire

    Default

    Quote Originally Posted by HUxI View Post
    nyc tutorial but i wana knw is there any way to make ur cam a little side way cox my chracter is in the middle of screen and i want him to a bit on left side like other 3rd person games.....how will i do that
    You can do this by going into the skeletal mesh properties and then adjust the origin position like '-40' on the x or y's position ( so that he is not in the middle of the origin). Hope that helps
    UDK Environmental Artist - for UnrealPHD
    Youtube channel for latest tests on UDK: http://www.youtube.com/user/jmprsh153?feature=mhee
    Online Portfolio: http://parishproductionmedia.moonfruit.com/

  2. #162

    Default

    Quote Originally Posted by JmPrsh153 View Post
    You can do this by going into the skeletal mesh properties and then adjust the origin position like '-40' on the x or y's position ( so that he is not in the middle of the origin). Hope that helps
    yes it helps in wht i wana do but nw d problem is that whnever i press A and D to move the player move towards and away from camera respectivly.......what should i change in controller code so it wont happen and also i want to strafe right and left instead of player to face towards it and move

  3. #163

    Default

    Hello guys. I read all the 17 pages and tried all the methods and I cant see the robot on screen. Something has to be working because I can adjust the zoom level using the mouse wheel.
    This is my code

    PHP Code:
    class AnotherTestGameInfo extends GameInfo
    DefaultProperties 
    {
    PlayerControllerClass = class 'AnotherTest.AnotherTestActionPlayerController' //Setting the Player Controller to your custom script
    DefaultPawnClass = class 'AnotherTest.AnotherTestActionPawn' //Setting the Pawn to your custom script

    PHP Code:
    class AnotherTestActionPawn extends UTPawn;

    var 
    float CamOffsetDistance//distance to offset the camera from the player in unreal units 
    var float CamMinDistanceCamMaxDistance
    var 
    float CamZoomTick//how far to zoom in/out per command 
    var float CamHeight//how high cam is relative to pawn pelvis 


    //override to make player mesh visible by default 
    simulated event BecomeViewTargetPlayerController PC 

       
    local UTPlayerController UTPC

       
    Super.BecomeViewTarget(PC); 

       if (
    LocalPlayer(PC.Player) != None
       { 
          
    UTPC UTPlayerController(PC); 
          if (
    UTPC != None
          { 
             
    //set player controller to behind view and make mesh visible 
             
    UTPC.SetBehindView(true); 
             
    SetMeshVisibility(UTPC.bBehindView); 
             
             
    //Show Crosshair = false, hide = true 
             
    UTPC.bNoCrosshair false
          } 
       } 


    //orbit cam, follows player controller rotation 
    simulated function bool CalcCamerafloat fDeltaTimeout vector out_CamLocout rotator out_CamRotout float out_FOV 

        
    local vector HitLoc,HitNormEndStartvecCamHeight

        
    vecCamHeight vect(-20,20,0); 
        
    vecCamHeight.CamHeight
        
    Start Location
        
    End = (Location+vecCamHeight)-(Vector(Controller.Rotation) * CamOffsetDistance);  //cam follow behind player controller 
        
    out_CamLoc End

        
    //trace to check if cam running into wall/floor 
        
    if(Trace(HitLoc,HitNorm,End,Start,false,vect(12,12,12))!=none
        { 
            
    out_CamLoc HitLoc vecCamHeight
        } 

       return 
    true


    simulated function CamZoomIn() 

        if(
    CamOffsetDistance CamMinDistance)        CamOffsetDistance-=CamZoomTick


    simulated function CamZoomOut() 

        if(
    CamOffsetDistance CamMaxDistance)     CamOffsetDistance+=CamZoomTick


    defaultproperties 

        
    CamHeight 50.0 
        CamMinDistance 
    60.0 
        CamMaxDistance 
    350.0 
            CamOffsetDistance
    =250.0 
        CamZoomTick
    =20.0     

    PHP Code:
    class AnotherTestActionPlayerController extends UTPlayerController;

    //Update player rotation when walking 
    state PlayerWalking 

    ignores SeePlayerHearNoiseBump


       function 
    ProcessMove(float DeltaTimevector NewAcceleDoubleClickDir DoubleClickMoverotator DeltaRot
       { 
          
    local Vector tempAccel
            
    local Rotator CameraRotationYawOnly
             

          if( 
    Pawn == None 
          { 
             return; 
          } 

          if (
    Role == ROLE_Authority
          { 
             
    // Update ViewPitch for remote clients 
             
    Pawn.SetRemoteViewPitchRotation.Pitch ); 
          } 

          
    tempAccel.=  PlayerInput.aStrafe DeltaTime 100 PlayerInput.MoveForwardSpeed
          
    tempAccel.PlayerInput.aForward DeltaTime 100 PlayerInput.MoveForwardSpeed
          
    tempAccel.0//no vertical movement for now, may be needed by ladders later 
           
         //get the controller yaw to transform our movement-accelerations by 
        
    CameraRotationYawOnly.Yaw Rotation.Yaw;  
        
    tempAccel tempAccel>>CameraRotationYawOnly//transform the input by the camera World orientation so that it's in World frame 
        
    Pawn.Acceleration tempAccel
        
        
    Pawn.FaceRotation(Rotation,DeltaTime); //notify pawn of rotation 

        
    CheckJumpOrDuck(); 
       } 


    //Controller rotates with turning input 
    function UpdateRotationfloat DeltaTime 

    local Rotator   DeltaRotnewRotationViewRotation

       
    ViewRotation Rotation
       if (
    Pawn!=none
       { 
          
    Pawn.SetDesiredRotation(ViewRotation); 
       } 

       
    // Calculate Delta to be applied on ViewRotation 
       
    DeltaRot.Yaw   PlayerInput.aTurn
       
    DeltaRot.Pitch   PlayerInput.aLookUp

       
    ProcessViewRotationDeltaTimeViewRotationDeltaRot ); 
       
    SetRotation(ViewRotation); 

       
    NewRotation ViewRotation
       
    NewRotation.Roll Rotation.Roll

       if ( 
    Pawn != None 
          
    Pawn.FaceRotation(NewRotationdeltatime); //notify pawn of rotation 
    }    

    exec function NextWeapon()  

        
    AnotherTestActionPawn(Pawn).CamZoomOut(); 


    exec function PrevWeapon()  

        
    AnotherTestActionPawn(Pawn).CamZoomIn(); 


    DefaultProperties 

         

    Is this the correct way to load the game info?(pic)
    http://imgur.com/nZILZ


    Thanks.

  4. #164
    Skaarj
    Join Date
    May 2012
    Location
    France
    Posts
    6

    Default

    Hi,

    I'm asking here because I used that type of camera. I'd like to control the camera rotation (left and right) with the left stick on the Xbox 360 controller.
    But I don't know where I can change that, I don't find it int the DefaultInput.ini nor in the camera code. Maybe i'm missing it

    Thanks for any help !

    And thanks for the code, it works great

  5. #165
    MSgt. Shooter Person
    Join Date
    Sep 2011
    Posts
    480
    Gamer IDs

    PSN ID: eshwarlion

    Default

    How do you slightly move the camera to the right of the player to give a third person shooter kinda look? I tried many possibilities but the rotation was messed up though the offset was in proper place

  6. #166

    Default

    Hello, I have ran into a bit of a wall when using this script - I'm attempting to use the original version of the script on page1. It just appears to give me the default in-game settings of GameInfo, The steps I have taken include
    1. Created this folder "UDK-2012-10\Development\Src\ActionGame\Classes" and placed "ActionPawn.uc" + "ActionPlayerController.uc" inside with the respective code.
    2. Edited "DefaultEngine.ini" to include "+ModEditPackage=ActionGame" (Also tried +EditPackages=ActionGame for what its worth) as the last entry under the field [UnrealEd.EditorEngine]
    3. Deleted UDKEngine.ini, closed everything and recompiled all scripts without error. (Only a warning message telling me theres nothing in MyMods which is from a previous script)
    4. Open UDK navigate to world properties change PIE to gameinfo (Do not see anything resembling "ActionGame"), run the game and it just gives me the floating character with no UI.

    Those are the steps Ive taken, If i have missed something could anyone fill me in? Would be greatly appreciated!
    Thanks in advance

    Edit: Forget to add the class, Whoops! :3

    class ActionGame extends UTDeathMatch;

    defaultproperties
    {
    DefaultPawnClass=class'ActionGame.ActionPawn'
    PlayerControllerClass=class'ActionGame.ActionPlaye rController'
    MapPrefixes[0]="Action"
    }
    Last edited by flethgin; 12-13-2012 at 02:40 AM. Reason: Resolved:

  7. #167

    Default

    Hey. i somehow got the scripts working with my own files, but when i try running just the code you have, the mesh appears invisible. Everything compiles fine, and this bit of code:
    UTPC.SetBehindView(true);
    SetMeshVisibility(UTPC.bBehindView);
    UTPC.bNoCrosshair = true;

    should make it visible correct? If someone could help me on this, i would appreciate it.

  8. #168

    Default

    Quote Originally Posted by TheHybrid View Post
    Hey. i somehow got the scripts working with my own files, but when i try running just the code you have, the mesh appears invisible. Everything compiles fine, and this bit of code:
    UTPC.SetBehindView(true);
    SetMeshVisibility(UTPC.bBehindView);
    UTPC.bNoCrosshair = true;

    should make it visible correct? If someone could help me on this, i would appreciate it.

    I have the same problem. Everything compiles perfectly but the Mesh is not visible.

    Code:
    //override to make player mesh visible by default
    simulated event BecomeViewTarget( PlayerController PC )
    {
       local UTPlayerController UTPC;
    
       Super.BecomeViewTarget(PC);
    
      
          UTPC = UTPlayerController(PC);
          if (UTPC != None)
          {
             //set player controller to behind view and make mesh visible
             UTPC.SetBehindView(true);
             SetMeshVisibility(UTPC.bBehindView); 
             UTPC.bNoCrosshair = true;
          }
       }
    ...doesn't work.

    Anyone can help?

  9. #169

    Default

    Hi.. I saw this post and tried to used this codes.. but when I compile it says "error. in the ControllerPlayer class, "var" can't be use here" .. what could this be?

  10. #170

    Default

    I'm having the same problem of the mesh not showing up. I wonder if its something with the newest UDK build.

  11. #171
    MSgt. Shooter Person
    Join Date
    Aug 2012
    Posts
    154

    Default

    @Carmy_Angel:
    Make sure all of your variables (var) in the class file are at the top of your script right under the "class ClassName extends ClassName" header for the .uc file thats throwing the error.

    This should fix your problem.

  12. #172

    Default

    Hi guys, i have one small problem. If i extend my game from UTGame, all this camera code isn't working, it seems like the PlayerControllerClass and DefaultPawnClass are completely ignored, i just get the UTGame default First Person Camera. Like this:

    Code:
    class TestGame extends UTGame; //this doesn't work, TestPlayerController and TestPawnClass ignored
    
    defaultproperties
    {
    	PlayerControllerClass=class'Test.TestPlayerController'
    	DefaultPawnClass=class'Test.TestPawn'
    }

    But if i extend the class from UDKGame i can see that the camera is working correctly (i set my own custom mesh). The reason why i want to extend it from UTGame is because i want to quickly get access to gun and to see how my camera behaves while firing weapons.

    Code:
    class TestGame extends UDKGame; //when extending from UDKGame it works
    
    defaultproperties
    {
    	PlayerControllerClass=class'Test.TestPlayerController'
    	DefaultPawnClass=class'Test.TestPawn'
    }
    Thanks.

    PS help for the guys who can't see their mesh: I couldn't see it as well, but i solved it by specifying the mesh i want to be displayed by putting this in the Pawn class, default properties

    Code:
    defaultproperties
    {
    
    	CamHeight = 40.0
    	CamMinDistance = 40.0
    	CamMaxDistance = 350.0
       	CamOffsetDistance=250.0
    	CamZoomTick=20.0	
    	Begin Object Class=SkeletalMeshComponent Name=UNCSkeletalMeshComponent
    	SkeletalMesh=SkeletalMesh'CH_IronGuard_Male.Mesh.SK_CH_IronGuard_MaleA'
    	AnimTreeTemplate=AnimTree'CH_AnimHuman_Tree.AT_CH_Human'
    	AnimSets(0)=AnimSet'CH_AnimHuman.Anims.K_AnimHuman_BaseMale'
    	PhysicsAsset=PhysicsAsset'CTF_Flag_IronGuard.Mesh.S_CTF_Flag_IronGuard_Physics'
    	End Object
    	Mesh=UNCSkeletalMeshComponent
    	Components.Add(UNCSkeletalMeshComponent)
    }
    Last edited by dejocar; 02-10-2013 at 05:30 PM.

  13. #173

    Default

    Quote Originally Posted by dejocar View Post
    PS help for the guys who can't see their mesh: I couldn't see it as well, but i solved it by specifying the mesh i want to be displayed by putting this in the Pawn class, default properties

    Code:
    defaultproperties
    {
    
    	CamHeight = 40.0
    	CamMinDistance = 40.0
    	CamMaxDistance = 350.0
       	CamOffsetDistance=250.0
    	CamZoomTick=20.0	
    	Begin Object Class=SkeletalMeshComponent Name=UNCSkeletalMeshComponent
    	SkeletalMesh=SkeletalMesh'CH_IronGuard_Male.Mesh.SK_CH_IronGuard_MaleA'
    	AnimTreeTemplate=AnimTree'CH_AnimHuman_Tree.AT_CH_Human'
    	AnimSets(0)=AnimSet'CH_AnimHuman.Anims.K_AnimHuman_BaseMale'
    	PhysicsAsset=PhysicsAsset'CTF_Flag_IronGuard.Mesh.S_CTF_Flag_IronGuard_Physics'
    	End Object
    	Mesh=UNCSkeletalMeshComponent
    	Components.Add(UNCSkeletalMeshComponent)
    }
    This works perfectly. Got the mesh to show up. Thanks for helping out all the people that are still starting UnrealScript

  14. #174

    Default

    No problem, i am starting with UnrealScript as well so i know how frustrating can it be

    Btw update on my issue - i managed to add premade UT weapon, the 'link gun'. I can see my character now running around in 3rd person nicely, but i can't see the weapon I can fire the weapon and see projectiles, but the weapon mesh is invisible -_- Since i am using the default wepon i guess that there is nothing wrong with that, probably something lacks in this camera code which is causing the weapon to not be displayed. The original camera code from this thread was written 2.5 years ago, probably something changed in the meantime in UDK and something must be specified to display 3rd person weapons. Could anybody help? Thanks

  15. #175

    Default 3rd Person Weapon issue

    Quote Originally Posted by dejocar View Post
    No problem, i am starting with UnrealScript as well so i know how frustrating can it be

    Btw update on my issue - i managed to add premade UT weapon, the 'link gun'. I can see my character now running around in 3rd person nicely, but i can't see the weapon I can fire the weapon and see projectiles, but the weapon mesh is invisible -_- Since i am using the default wepon i guess that there is nothing wrong with that, probably something lacks in this camera code which is causing the weapon to not be displayed. The original camera code from this thread was written 2.5 years ago, probably something changed in the meantime in UDK and something must be specified to display 3rd person weapons. Could anybody help? Thanks
    Im still having same problem.. the ONLY way i have gotten it to work is to follow the isometric from UDK but thats not why where here.. WE want the mouse zoom 3d rotate and the fuctions that ACTION has gvien us. SO With the MESH issue i just read
    Code:
    defaultproperties
    {
    
    	CamHeight = 40.0
    	CamMinDistance = 40.0
    	CamMaxDistance = 350.0
       	CamOffsetDistance=250.0
    	CamZoomTick=20.0	
    	Begin Object Class=SkeletalMeshComponent Name=UNCSkeletalMeshComponent
    	SkeletalMesh=SkeletalMesh'CH_IronGuard_Male.Mesh.SK_CH_IronGuard_MaleA'
    	AnimTreeTemplate=AnimTree'CH_AnimHuman_Tree.AT_CH_Human'
    	AnimSets(0)=AnimSet'CH_AnimHuman.Anims.K_AnimHuman_BaseMale'
    	PhysicsAsset=PhysicsAsset'CTF_Flag_IronGuard.Mesh.S_CTF_Flag_IronGuard_Physics'
    	End Object
    	Mesh=UNCSkeletalMeshComponent
    	Components.Add(UNCSkeletalMeshComponent)
    }
    This SHOWS the MESH so why cant we just SHow the Weapon???


    SkeletalMesh=SkeletalMesh'WP_LinkGun.Mesh.SK_WP_Li nkGun_3P' is what i found for the mesh for basic link gun lets work from here

  16. #176

    Default

    @Supamigit man you are lucky today. I solved this problem few days ago but today i remembered that i posted in this thread so i visited it now to post my solution. And lucky you that you posted today as well the solution - the class that determines how the weapon will look like in 3rd person is the weapon attachment class. I am using my custom weapon and i set everything there, but basically this is how it should go:

    Code:
    class MyWeapon_Attachment extends UTBeamWeaponAttachment;
    
    defaultproperties
    {
    // this will set how the mesh will look like in 3rd person 
    Begin Object Name=SkeletalMeshComponent0
           SkeletalMesh=SkeletalMesh'WP_LinkGun.Mesh.SK_WP_LinkGun_3P'
           bOwnerNoSee=false
           bOverrideAttachmentOwnerVisibility=true
           bOnlyOwnerSee=false
           bIgnoreOwnerHidden=true
    End Object
    //MuzzleFlashSocket=MuzzleFlashSocket
    Mesh=SkeletalMeshComponent0
    
    WeaponClass=class'MyWeapon_Gun'
    }
    Code:
    class MyWeapon_Gun extends UTWeapon;
    
    defaultproperties
    {
    AttachmentClass=class'MyWeapon_Attachment'  //reference the attachment class
    // Pickup staticmesh
    Begin Object Name=PickupMesh
    	   SkeletalMesh=SkeletalMesh'WP_LinkGun.Mesh.SK_WP_LinkGun_3P'
           bOverrideAttachmentOwnerVisibility=true
           bOnlyOwnerSee=false
           bIgnoreOwnerHidden=true
    End Object
    }
    Code:
    class MyGame extends UTGame;
    
    static event class<GameInfo> SetGameType(string MapName, string Options, string Portal)
    {
    	return default.class;
    }
    
    function AddDefaultInventory( pawn PlayerPawn )
    {
    	if( PlayerPawn.IsHumanControlled() )
    	{
    		PlayerPawn.CreateInventory(class'MyWeapon_Gun',true); //here we give our weapon to pawn
    	}
    
    }
    Of course there are multiple ways to do this. And you can also have other code in these classes, this just the minimum that i believe is required for weapon to appear in 3rd person! Let me know if it helped.

  17. #177

    Default

    This camera is amazing, thank you for making it, and it works perfectly for me in the default UDK. However I am encountering this issue with it in the blank UDK:

    http://imgur.com/HAPzX4F

    Does anyone know a solution to add SetBehindView back into the blank UDK?

    Its a requirement I work within the blank one and not the default one by my games course so just using the default version of UDK isnt an option sadly

    Thanks to anyone who can help me with this Really happy to finally have a working character in the blank UDK, just need to get the camera fixed ^_^

  18. #178

    Default

    I just discovered this camera, and it's fantastic! I love how the camera and the player can move separately,
    Its far superior to the attached cameras that I've found until now for a 3D platformer I'm working on.
    However, I've run into a predicament. When I use this camera with custom meshes, It works fine 90% of the
    time, but depending on the angle of the camera, the mesh blanks itself out and disappears.
    Does anyone know of any fixes for this?


 
Page 5 of 5 FirstFirst ... 345

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.