Announcement

Collapse
No announcement yet.

[Update 2] Plug n Play Big Van Thing / FireTruck

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

    #16
    thank you wanderer
    iv been trying to work that one out for ages

    updated the first post. new script and folder layout. old model with 6 materials still.
    hopefuly there will be no warnings this time

    Comment


      #17
      Just tried out the camera modes. excellent work, teglag
      and props for releasing so other can learn from it.

      Comment


        #18
        I've implemented the camera system which works except that when you get into the vehicle the camera is under the ground until the mouse is moved, then it goes to the correct position. Any ideas?

        Thanks

        Comment


          #19
          when you first get into the vehicle the cam should stay where it is, i have 3rd person view on my pawn so it works ok. the camera code is in TeglegVehicle_Base (or similar :s)
          look for VehicleCalcCamera().
          if you want it following straight away either:

          put in PostBeginPlay()
          CamType=1;

          or make a cam for camtype 0

          the camera modes are seperated by cases, ie
          Case 0:
          // your new cam
          Break;
          Case 1:
          // blah....
          Break;

          hope thats not too confusing, it is supposed to be something to learn with.

          Comment


            #20
            Cheers, I did try setting the camtype in the defaults and postbeginplay but it still wouldnt work. I fixed it in the end though! I only wanted camera mode 5 so I removed

            if (CurrentRot != IdealRot)

            From that case and it works ok now may not be the best way of fixing it but it worked haha

            Comment


              #21
              well done
              theres nothing wrong with a good bit of hacking to make it work how you want.

              Comment


                #22
                I am trying to get this to work in the Mobile environment and I am coming across and error with the UTPawn. The compiler error is as follows, "Error, Unrecognized type 'UTPawn' "

                Also, for the seats array, where do I setup the number of seats in the code? I noticed in the 'TeglegVehicle_FBase' file, the seat array is only called, never defined. Furthermore, how do I define my socket of choice, for the camera location. I might be skipping it, but I am pretty sure It is also not in that FBase file.

                Thanks Tegleg for the files and I hope I can sort this out.

                Comment


                  #23
                  this vehicle is extended from UTVehicle and the mobile stuff doesnt have these classes unless you include them.

                  im guessing the error is in Fbase?
                  its probably this line
                  P = UTPawn(Seats[SeatIndex].SeatPawn.Driver);
                  you would change it to your pawn
                  P = YourPawn(Seats[SeatIndex].SeatPawn.Driver);

                  the seats array is set up in UTVehicle in InitializeSeats()
                  theres lots of calls to ut classes so it might be a bit of a nightmare to sort out without them.
                  the socket is defined in fire_content
                  Seats(0)={( //blah..
                  CameraTag=GunViewSocket,

                  i might actually do a vehicle camera tutorial (using my mobile car) cos this comes up a lot in the forum.

                  Comment


                    #24
                    Originally posted by tegleg View Post
                    this vehicle is extended from UTVehicle and the mobile stuff doesnt have these classes unless you include them.

                    im guessing the error is in Fbase?
                    its probably this line
                    P = UTPawn(Seats[SeatIndex].SeatPawn.Driver);
                    you would change it to your pawn
                    P = YourPawn(Seats[SeatIndex].SeatPawn.Driver);

                    the seats array is set up in UTVehicle in InitializeSeats()
                    theres lots of calls to ut classes so it might be a bit of a nightmare to sort out without them.
                    the socket is defined in fire_content
                    Seats(0)={( //blah..
                    CameraTag=GunViewSocket,

                    i might actually do a vehicle camera tutorial (using my mobile car) cos this comes up a lot in the forum.
                    How would I go about using a single case? I am not sure what is important from case 1, or if cases differ and run independently.

                    Comment


                      #25
                      case 1 is more or less the same as in the scorpion, so just copy it from there.
                      cases do run independently, thats the idea of using cases.

                      working on a tutorial right now
                      atm ill do,
                      using a socket location
                      chase cam
                      sidescroller

                      anything else?

                      Comment


                        #26
                        Originally posted by tegleg View Post
                        case 1 is more or less the same as in the scorpion, so just copy it from there.
                        cases do run independently, thats the idea of using cases.

                        working on a tutorial right now
                        atm ill do,
                        using a socket location
                        chase cam
                        sidescroller

                        anything else?
                        If hardattach is possible with this (such as using camera actors), I'd like to know how to do that. Also, the ability to move the camera location via code, instead of relying on the relative location of the socket.

                        Comment


                          #27
                          I wanted to share the code that gave me a fixed camera (not a bouncy camera):



                          Code:
                          var name CameraTag;
                          
                          simulated function bool CalcCamera( float fDeltaTime, out vector out_CamLoc, out rotator out_CamRot, out float out_FOV)
                          {
                               local vector SocketLoc;
                               local rotator SocketRot;
                          
                          Mesh.GetSocketWorldLocationAndRotation(CameraTag, SocketLoc, SocketRot);
                          
                               out_CamLoc = SocketLoc;
                               out_CamRot = SocketRot;
                          
                          return true;
                          }
                          Code:
                          defaultproperties
                          {
                               CameraTag=YourSocketName
                          }
                          Thanks to Tegleg of course.

                          Also, this is a bit off topic but the answer might be helpful for those who view this thread. Does anyone know what values the editor pulls for things like pawn speed? I noticed a dramatic difference in testing between the editor and the UDKMobileLift.exe

                          Comment


                            #28
                            How do i put in a level? just loaded the package and tried to put ingame, but its only shows the model, i canĀ“t interact and there is no collision.

                            Comment


                              #29
                              look in the actor browser under Vehicles
                              drag TegVehicle_Fire (or whatever its called) onto your map

                              Comment


                                #30
                                I'm not a coder so sorry if there is an obvious answer for this. I placed the vehicle in game and when I go to enter the vehicle it places the camera in a set spot and doesn't follow. The controls still work and the vehicle still moves but the camera just stays where it is.

                                What can I do to fix this?

                                Thanks for the code and everything tegleg. Was racking my brain out trying to figure out how to place custom vehicles into udk.

                                Comment

                                Working...
                                X