Announcement

Collapse

The Infinity Blade Forums Have Moved

We've launched brand new Infinity Blade forums with improved features and revamped layout. We've also included a complete archive of the previous posts. Come check out the new Infinity Blade forums.
See more
See less

UDK action game - 3rd person camera code

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

    Well ill go into more detail if i get a response cause this room peaked for a bit then has seem to die off...

    so as before with the help of dejocar

    we have a minor zoom to shoulder and back with mousewheel
    its 3rd person with the mesh showing
    also with his fix we have a mesh showing for the weapon

    my issue is now it just doesnt fire...
    id say it was input section of UC but when i set a weapon factory and grab a rocket launcher... it shoots from the right spot but obvesly cause its setup for first person the mesh sites behind the playermesh

    but the Linkgun dejocar setup just doesnt fire anything

    I cant handle the MASS changes UDK are doing with each update if the scripts from the version before CEASE to work.. like reinventing the wheel everytime.
    I know also if i understood the Uscript in more detail then id build it from ground up and not use anyones code to get a headstart on making something fun for us all to play

    Action_Attachment - part of getting the weapon to SHOW correctly in 3rd
    Action_Gun

    ActionGame
    ActionPawn
    ActionPlayerController

    Anyone have ideas fixes or even something that is 3rd person with working weapons so i can cross reference

    Heres my files
    https://drive.google.com/folderview?...TQ&usp=sharing

    Comment


      bump

      so i guess i need to break down what each part does.. ive tried to look into utgame.uc as this is the basis of most games...

      player - no mesh
      mesh - adding to player
      gun - code to let UDk know what it is'
      gun mesh - attach ti show mesh
      Then what would be the next stage for actually firing and having a projectile?

      im going to day try and copy a linkgun fully and JUST change the mesh and postion to 3rd as to atleast have firing fuctionality then i will work out how to get the AIM to be in the roght location due to first being middle of chest and 3rd is slightly off the body due to the angle of the camera off to the left or right depending on your placement.

      here we go again time to decipher weapon making tutorials to work with june UDk.. sighh lol

      Comment


        so i looked and found a HOW to for making a weapon and walla i have a shockrifle attached to my game and it fires ive also add the UC file in my googledrive folder..

        now its offset and well i figured that out chaging the UTWeap_ShockRifle2 line 361
        PlayerViewOffset=(X=30,Y=0,Z=0) and walla its moved but heres my issue since most 3rd person has the camera attached to the mesh and isnt movable by the mouse on it own... it has attached to the mouse movements and alas doesnt stay static to the mesh so when i move the mesh forward and rotate my mouse i effective can shoot myself in my face LOl so.... i am stuck again

        anyone come across a fix or a direction for me im willing to learn i just need the mext step..

        Comment


          Well, this does not work for me. I keep getting two errors when compiling.
          Click image for larger version

Name:	2014-01-06_0244.jpg
Views:	1
Size:	17.1 KB
ID:	3250155
          As you can see, the compiler is complaining about the "AimNode" being a bad command or expression. I also have the other error which I don't have a clue how to fix.

          Any help would be greatly appreciated.

          Thanks.

          Comment


            Oh my goodness, thank you so much for this code, you've literally saved my project! Also a huge thanks to everyone who helped contribute to make the code even better, I love you all

            Comment


              Originally posted by Lord of the Dead View Post
              Well, this does not work for me. I keep getting two errors when compiling.
              [ATTACH=CONFIG]14449[/ATTACH]
              As you can see, the compiler is complaining about the "AimNode" being a bad command or expression. I also have the other error which I don't have a clue how to fix.

              Any help would be greatly appreciated.

              Thanks.

              Was this with the code i placed or the main code thats in the pages here... seems like a typo error from what i can see

              Comment


                Hi guys i've been reading through this thread and I like the idea of using this camera for my game, but I'm more of a 3d designer than a programmer so I have no idea where to start in order to impliment this code.

                So here's my question or rather, request. Somebody asked the same thing a while back but didn't get an answer (if they did then I'm simply too much of a noob to even recognize the answer) so please help us out, Can somebody please explain from the very begining, possibly step by step what I need to do in order to get this code working. I know its probably a lot to write but I'd really appreciate it.

                Many thanks in advance.

                Comment


                  If your zoom still isnt working when launching udkgame, just add this to your game infoclass. The problem is that when you launch the game is auto loading UT deathmatch instead of your gamemode. BAMMMMMM!

                  Code:
                  static event class<GameInfo> SetGameType(string MapName, string Options, string Portal)
                  {
                  	return Default.Class;
                  }

                  Comment


                    @spartanx I love this website - http://bit.ly/1bsCKU1
                    EDIT: The link above was too offensive - Please go here directly http://udn.epicgames.com/Three/Devel...ptProject.html

                    Follow that tutorial, by the end of it you'll know what to do with the code. Then you'll be onto syntax and logic errors

                    Comment


                      Originally posted by GeekyPayback View Post
                      @spartanx I love this website - http://bit.ly/1bsCKU1

                      Follow that tutorial, by the end of it you'll know what to do with the code. Then you'll be onto syntax and logic errors

                      Sorry my below comment was a bit harsh and i see the poster Changed his post... im sorry was having a pretty bad day with code and getting frustrated with reposes similar to that on other sites i posted requests to

                      """"""""""""""""""""
                      SERIOUSLY why BOTHER WRITING THIS??? and to the PRO developers if this is becoming to much for you to reply with answers .. THEN JUST DONT REPLY anything... writing something cocky like search on GOOGLE.. please dont kill ppls wants and needs as this is a forum and not YOUR home to OWN as your a class A programmer or actually get UDK so well its like candy for you...

                      Are we not learning here?
                      """"""""""""""""""""""""""""

                      on a Better note i have got the GOW camera to work and i will start sifting through this one (which if i remember correctly is free cam code) will start to fix the errors in each..

                      Comment


                        Working at an academic institution I have learned one of the most powerful techiques that can be taught is how to find what you are looking for. By showing that an answer exists at the end of a search tool, hopefully it has educated people to the location of the resource, and how I myself found that resource.

                        Give a man a fish and he'll eat for a day, teach him to fish and he'll eat forever.

                        I offered support with syntax and logic errors, things we people here actually help with.

                        That said, I will apologize for using lmgtfy (it probably was poor taste), and update the post so others don't get offended. Im not going to remove it so people can see what we are talking about.

                        Not sure how my link would have helped with your camera issues, but I do apologize for upsetting you.

                        Thanks
                        --
                        Stuart

                        Comment


                          Sipamigit: As an olive branch I downloaded your code. My understanding of this thread is that you have got the weapon firing, but it always fires where the camera is looking, so you can shoot yourself in the face.

                          Your Pawn class needs a GetBaseAimRotation(). This function is called by the weapon to determine where it should fire from. At present I suspect it is using the controller logic to determine the fire location, but you should override it to use the pawn's location + rotation - this is from my code below (which is a third person game).

                          Code:
                          simulated singular event Rotator GetBaseAimRotation()
                          {
                          	local rotator   POVRot;
                          
                          
                          // Set our rotation to the pawns rotation
                            POVRot = Rotation;
                          
                            if( POVRot.Pitch == 0 )
                            {
                              // Grab the data from the replicated data so that everyone sees the same data
                              POVRot.Pitch = RemoteViewPitch << 8;
                            }
                          
                            return POVRot;
                          }

                          Comment


                            For those who didn't know how to use, you need to create a game info

                            Code:
                            class MyGameInfo extends UTDeathmatch;
                            
                            defaultproperties
                            {
                                    bDelayedStart=false
                                    PlayerControllerClass=class'MyMod.ActionPlayerController'
                                    DefaultPawnClass=class'MyMod.ActionPawn'
                            
                                    Name="Default__MyGameInfo"
                            }
                            You can also change the extends UTDeathmatch to the game info that you want I think (Ex: extends AdventureGame), but you need to rename some lines from the other files to properly see the model.

                            The class'MyMod means that the folder MyMod is the one used, so if you want to place into another folder (Ex: AdventureFolder), then you must rename to class'AdventureFolder

                            MyGameInfo means the name for the game type in the world properties, you can change to whatever you want (Ex: AdventureGameInfo), do this for both lines and for the .uc file name.

                            Comment

                            Working...
                            X