Announcement

Collapse
No announcement yet.

GTA Style Vehicle Interaction - Project File Included

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

  • replied
    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.

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    Oh ok, thanks. I'll also post here if i turn this into multiplayer before you do.

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    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?

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    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.

    Leave a comment:


  • replied
    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

    Leave a comment:


  • replied
    thank you

    Leave a comment:


  • replied
    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?

    Leave a comment:


  • replied
    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!

    Leave a comment:


  • replied
    Originally posted by Jacky View Post
    Hello there,

    Here you'll find a sample project that lets you drive any number of vehicles that exist in a level, as long as they are based on the same vehicle BP. It is setup in Player Controller BP and making it work with several different vehicle BP's is up to you. And dont forget to add a box(or sphere, doesnt matter) component to your vehicle BP for overlap events as you'll see in Sedan BP's in the project.



    Let me know if you see any oddities or something doesnt work.

    Enjoy!

    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

    Leave a comment:


  • replied
    I printed out the tutorial and went through the tutorial again and it worked. I added two more cars and I can enter/exit any car.

    Leave a comment:


  • replied
    Originally posted by Geodav View Post
    btw looks like they updated the docs which should help
    https://docs.unrealengine.com/latest...nts/index.html
    about halfway down
    Heh...i wouldnt have bothered with this if i knew about that documentation. But i'm glad people are finding this useful and now they can see that link to the documentation as well. Using the vehicle class doesnt work only because of the Box component. You cant generate events without a box component in this current setup, so... But it is doable if you find out whether you are near the car or not with traces or some other way from FPS character side.

    @Sunboy: Happy to help!

    @jeffmorris: I havent read through that tutorial yet so i cant help you on that right now.
    Last edited by Jacky; 09-28-2014, 06:12 PM.

    Leave a comment:


  • replied
    In Step 15 of the Entering/Exiting a Vehicle tutorial, how do I get the blue Set Car mode? Which BP should I be working on - Sedan or MyCharacter?

    Leave a comment:

Working...
X