Announcement

Collapse
No announcement yet.

GTA Style Vehicle Interaction - Project File Included

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

    #16
    Originally posted by LexLuthor1 View Post
    This is pure class Jacky
    Haven't been on the forums in a while, due to work pressures - but was greeted by this GEM when I logged in.....
    It's funny actually, all the time I've been on these and the Epic Games forums, it never occurred to me that you might be the same "Jacky" from YouTube who used to be a GTA modder???????
    I only ask because we used to have a bit of banter in my UDK tutorials and what not ....
    If you are, it's a small world , if not, you rock anyway
    Hey Dave!

    I'm not that Jacky, unfortunately. I'm not even a huge fan of the GTA series, but there was a need for this kind of stuff by the community so i gave it a go.

    Hope to see you around more often!
    FREE VR Drum Kit Project
    FREE Color LUT Collection
    FREE Physics Driven Spacecraft Project
    FREE GTA Style Vehicle Interaction
    Dynamic DoF(Depth of Field)
    Camera Crossfade

    Comment


      #17
      Originally posted by Jacky View Post
      Hey Dave!

      I'm not that Jacky, unfortunately. I'm not even a huge fan of the GTA series, but there was a need for this kind of stuff by the community so i gave it a go.

      Hope to see you around more often!
      Hi. I get your tut. with working for mine character but like Tim said cars dont stop. Maybe we need to respawn car when exit?
      ihavenick.net | Free, simple tutorials and news.
      atacetin.net | My portfolio page

      Comment


        #18
        thank you

        Comment


          #19
          Originally posted by Tim Hobson View Post
          the vehicle does not slow down and stop after jumping out. It will keep it's same trajectory and movement speed. Notice the orange car. It was continually circling me like shark while I typed this!
          I have been implementing enter-able vehicles and encountered this problem as well. I had been searching for a solution and someone linked me this topic.

          So far I've been unable to actually solve the problem. Jacky, did you have any luck getting it to properly stop?
          I've tried resetting input, setting velocity to 0, applying negative velocity, stop movement immediately, even calling VehicleMovementComponent's ClearInput() function in C++ but it just keeps going D:
          It's as if Unposses is not properly resetting movement/input for vehicles.

          Also, I noticed that vehicles do not handle/determine collision in the same way as other objects; I had an object without any collision but the vehicle can drive over it. The chassis would clip through like everything else though. Only the wheels collide.

          Using UE version 4.5.1

          Comment


            #20
            Add this to the end of Leave the car and spawn player section:

            Click image for larger version

Name:	car_autohandbrake.JPG
Views:	1
Size:	28.7 KB
ID:	1061314

            Now the car will pull the handbrake when you leave it and you'll have to tap the handbrake when you re-enter.
            FREE VR Drum Kit Project
            FREE Color LUT Collection
            FREE Physics Driven Spacecraft Project
            FREE GTA Style Vehicle Interaction
            Dynamic DoF(Depth of Field)
            Camera Crossfade

            Comment


              #21
              Yea I actually did try that as well but that didn't work either. I also tried restoring the AIController it spawns with. Didn't work either.

              PS. I'm in a MP environment and I execute vehicle enter/leave server side using a Run on Server custom event.

              Comment


                #22
                Oh, mine works just fine for single player, i havent fiddled with MP yet. If you have the time, can you upload the project with your MP update please so that everyone can make use of it?
                FREE VR Drum Kit Project
                FREE Color LUT Collection
                FREE Physics Driven Spacecraft Project
                FREE GTA Style Vehicle Interaction
                Dynamic DoF(Depth of Field)
                Camera Crossfade

                Comment


                  #23
                  Well I was working on my own implementation when I encountered the problem. While trying to fix it, someone pointed me to this topic but it turned out this had the same problem :P
                  But as I'm working on a whole project I don't really have something I can upload atm.
                  I can see if I can convert this to MP though. Shouldn't be too difficult I think and that would give us a bare bones platform for experimentation.

                  Comment


                    #24
                    Oh ok, thanks. I'll also post here if i turn this into multiplayer before you do.
                    FREE VR Drum Kit Project
                    FREE Color LUT Collection
                    FREE Physics Driven Spacecraft Project
                    FREE GTA Style Vehicle Interaction
                    Dynamic DoF(Depth of Field)
                    Camera Crossfade

                    Comment


                      #25
                      Actually looking at it now but the BP seems quite a bit more complex/monolithic than it could be. While I will not make it less monolithic, I may simplify/change a few nodes so it'll be a bit easier to read/use.

                      And allow for entering dynamically spawned vehicles.

                      Comment


                        #26
                        Status update.

                        I ended up moving around nodes between blueprints after all. I just couldn't leave it all monolithic xD
                        That said, I currently have one bug left (aside from the infinite driving bug). Possessing the newly spawned player when you exit the vehicle doesn't properly work yet; clients are unable to control the new character.
                        Also, the player orientation bug is fixed as well. I noticed that you didn't zero out pitch and roll when you spawned the player which would cause weird behaviour such as seen in the image posted by Tim Hobson.

                        EDIT: Ugh totally forgot to include the dload link for what I have so far..
                        https://www.dropbox.com/s/gqka9hgpwc...eSetup.7z?dl=0
                        Last edited by Omar007; 11-21-2014, 06:00 PM.

                        Comment


                          #27
                          Thanks for posting this Jacky... judging by the vast number of vehicle questions, I'm sure this will be a great help to a multitude of users!

                          Comment


                            #28
                            Originally posted by Steve Hardister View Post
                            Thanks for posting this Jacky... judging by the vast number of vehicle questions, I'm sure this will be a great help to a multitude of users!
                            Yeah, hope people are finding this thread useful.

                            And thanks for the project and fixes, Omar! I'll check it out soon.
                            FREE VR Drum Kit Project
                            FREE Color LUT Collection
                            FREE Physics Driven Spacecraft Project
                            FREE GTA Style Vehicle Interaction
                            Dynamic DoF(Depth of Field)
                            Camera Crossfade

                            Comment


                              #29
                              This is an awesome addition to the Car Vehicle Template! Can't wait to see it develop.

                              Comment


                                #30
                                Originally posted by Jacky View Post
                                Yeah, hope people are finding this thread useful.

                                And thanks for the project and fixes, Omar! I'll check it out soon.
                                I had some time today to look at this problem again and I've found out where the problems occur.
                                Both the infinite driving and unable to control the newly created character are related to the same problem; possession desync between the server and client.

                                Before we exit any vehicle, we have 2 replicated characters; on the (listen) server GTA_Character_C and GTA_Character_C1, on the client GTA_Character_C2 and GTA_Character_C3.
                                When we exit the vehicle, a new replicated pawn for the player is created; on the server GTA_Character_C4 and on the client GTA_Character_C5. The problem is that when we posses the newly spawned character, it tries to posses GTA_Character_C4 on the client instead of the replicated GTA_Character_C5. It is as if it possesses before it replicates and ends up possessing the wrong pawn as a result.

                                To test this, I introduced a delay node between the spawn and the possess of 1 second and after that point it works correctly; it possesses the GTA_Character_C5 pawn. This delay basically allows replication to happen first.
                                At this point, vehicles stop moving automatically (it may move along for quite a bit though if 'Idle Brake Input == 0' in your BP and you where driving fast) and players can properly control their characters!
                                I have a serious feeling that this may be a bug that needs to be fixed. This may possibly give people a massive headache when they're trying to figure out why their spawning logic doesn't work in MP even though it's logically correct.

                                I'll put the version with the Delay node added at the same link as before. I'll update this post when I uploaded it.


                                EDIT: File has been uploaded. You can grab it here: https://www.dropbox.com/s/gqka9hgpwc...eSetup.7z?dl=0
                                Last edited by Omar007; 12-25-2014, 01:39 PM.

                                Comment

                                Working...
                                X