Announcement

Collapse
No announcement yet.

[Tutorial] Third Person Game with GOW camera

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

    #16
    Awesome man, I will give it a run through tomorrow morning.

    Thanks for providing so much info.

    Comment


      #17
      I also want to thank you for guiding me in the right direction with implementing Mathematics formulas (particularly trig) in UScript.

      Mostly I was getting confused about the symbols used in scripting since my background in coding has been mostly a whole lot of QBASIC, BlitzBASIC, and DarkBasic. The symbols like ==, !=, etc were a little confusing, but after muddling through this alongside some JavaScript Basics tuts, I think I got this nailed down now.

      Comment


        #18
        Oh man, I know how it is, I'm just an amateur myself. This is a really good reference for using UDK. I can't count the number of times I've went back there to figure out what the hell I'm doing.

        Comment


          #19
          Well, I tried to get this working, but am still stuck with the same old default camera and have to toggle over-the-shoulder... Not quite what I was looking for. Maybe if I was making a Mass Effect type game....

          I tried executing the ShoulderCam function after the "simulated event PostBeginPlay()", but I get a compile error. Where would be the proper place to initiate this function to get the over-the-shoulder cam by default?

          Comment


            #20
            Ah, ok. So the script was designed to toggle back and forth on a press and release basis, but it's really easy to change.
            If you want it to just start with the over the shoulder camera, you're going to want to go into YourGamePawn

            Code:
            simulated function name GetDefaultCameraMode(PlayerController RequestedBy)
            {
            	return 'ThirdPerson';
            }
            and change "ThirdPerson" to "ShoulderCam" That will tell your pawn to ask for the shoulder camera by default. This also means that you'd want to change the behavior of the ShoulderCam and ReturnCam functions in your playercontroller, and maybe also the behavior of the keybinding (since it's set as a toggle switch kind of thing). If you have any questions about any of that stuff just let me know.

            Comment


              #21
              Wow, thanks, that was a much simpler fix than I was trying to do, lol.

              Comment


                #22
                Man, I swear I've followed your tutorial to the letter (the first part, not the GOW part), and it won't work.

                When I click launch it takes me to the level I specified (DM-Deck), but it's just a normal first person camera.

                I've even kept everything as per your names (YourGame), so I can literally copy and paste everything and it still doesn't work. Is there any way to easily tell through logging if there is a problem?

                I really appreciate that you've taken the time to do this, sorry for being such a pain.

                Comment


                  #23
                  Nice post. But tbh for me it seems like a lot of ball ache for something that is similar to behindview command the only difference is with this camera you can zoom in and out.

                  But yeh, I might tweak this a little and see what I can do with it thanks for the post.

                  Comment


                    #24
                    Note: Please back up your config files before editing them. You'll probably be sorry if you don't.
                    So so true. How I wish I had read this note an hour ago. Waiting on download of fresh UDK install right now.

                    Comment


                      #25
                      just seen that you've uploaded it on udkbase too.
                      Big thanks for supporting.

                      I'm right now changing the used bbcode tags so that it's showed the right way.
                      thanks again and a awesome tutorial!

                      Comment


                        #26
                        This is a great tutorial man, really good for people trying to work out how to set up there own custom camera's, but in my case it was exactly what I wanted. Now the tricky part, iv'e been fiddling around trying to get a basic weapon in like a link gun, since there is no defualt gun's for GamePawn. Iv'e tried changing to UTPawn but it ruins the camera. Please any help would be great, maybe even a hud tutorial with GamePawn.

                        Thanks heaps man awesome tutorial

                        Comment


                          #27
                          Originally posted by Prophet_ View Post
                          This is a great tutorial man, really good for people trying to work out how to set up there own custom camera's, but in my case it was exactly what I wanted. Now the tricky part, iv'e been fiddling around trying to get a basic weapon in like a link gun, since there is no defualt gun's for GamePawn. Iv'e tried changing to UTPawn but it ruins the camera. Please any help would be great, maybe even a hud tutorial with GamePawn.

                          Thanks heaps man awesome tutorial
                          Yes, there is not DefaultGun variable, instead you need to use this line in your GameInfo class's DefaultProperties block:

                          DefaultInventory(0)=class'CustomGame.CustomLinkGun '

                          Comment


                            #28
                            Ok, so I got most of this done. I did everything but the last shoulder cam part. I am having a little trouble with the camera though.

                            If my environment is not indoor (ie. w/ a ceiling) it goes very high up in the air if you try to rotate above the pawn. Also, when I tried loading dm-deck as a map, there were certain random spots where if I rotated the camera just right, it would zoom out very far away from the player.

                            I tried doing something like this to fix it:

                            Code:
                            if(FreeCamDistance > 512)
                            {
                                           FreeCamDistance = 512;
                            }
                            This didn't seem to change anything noticeable. I figured it would make sure that the cam didn't go to far from the pawn. Any ideas?

                            Comment


                              #29
                              Hey guys, thanks for the positive feedback!

                              @Cory, it sounds like you have the camera zoomed far out, and you're letting the collision check reign it in for you. First off, you can just use your scroll wheel and zoom in if you don't like the current distance. Second, if you don't want your player to be able to zoom out that far at all, the zoom limit is handled in the playercontroller script. If you'd like to set it lower than 512, in your playercontroller script you need to edit:

                              Code:
                              if (PlayerCamera.FreeCamDistance < 512) // Edit this value. Set it lower if you'd like to have the zoom limited to a closer distance
                              	{
                              		`Log("MouseScrollDown");
                              		PlayerCamera.FreeCamDistance += 64*(PlayerCamera.FreeCamDistance/256);
                              	}
                              }
                              @MickyG, sorry for taking so long to get back to you about this. Hmm, that is interesting. It sounds to me like there's a mistake in your ini files somewhere. Have you tried making a test level to launch to? Other than that, all I can suggest is going through the tutorial again, first double checking your ini files, and then if that doesn't work, copy/pasting the code into your scripts again.

                              @junkens, thank you for having a wonderful website like UDKBase. If I needed to update the tutorial on UDK base, say if I edit it here (I'm thinking about putting in DeltaTime to correct some zoom effects) is there any way I can edit the one on UDKBase?

                              Cheers all,

                              JT

                              Comment


                                #30
                                Can you elaborate on how DeltaTime plays a role in the tutorial currently, and how it will play a role in the functionality you're thinking about implementing, I am interested.

                                Comment

                                Working...
                                X