Announcement

Collapse
No announcement yet.

GTA Style Vehicle Interaction - Project File Included

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

  • replied
    its work on 4.7.3 very well

    Leave a comment:


  • replied
    hi
    what version this work well on???

    Leave a comment:


  • replied
    Originally posted by Zak Middleton View Post
    Hey everyone, please check the AnswerHub post here for an explanation of the networking issues going on here, with a solution provided as well.

    The most important takeaways are:

    1. Only use "Possess" on the server. We will fix future releases to make this more clear and enforce it correctly.
    2. Only spawn/destroy Pawns on the server if they can be possessed. Ideally you won't need to destroy and spawn the Pawn in these scenarios, but it can be made to work.
    3. You guys are awesome for bearing with us and for helping with the investigation

    -Zak
    Thanks so much for the help! Glad to see the possession has been sorted, i can get back developing a project.

    Leave a comment:


  • replied
    Originally posted by TheJamsh View Post
    Thanks for this Jacky; and Omar: you're a life-saver.

    Vehicle / Character possession through network is turning into a nightmare, I'm not the only one struggling with it working reliably it seems.
    Hey everyone, please check the AnswerHub post here for an explanation of the networking issues going on here, with a solution provided as well.

    The most important takeaways are:

    1. Only use "Possess" on the server. We will fix future releases to make this more clear and enforce it correctly.
    2. Only spawn/destroy Pawns on the server if they can be possessed. Ideally you won't need to destroy and spawn the Pawn in these scenarios, but it can be made to work.
    3. You guys are awesome for bearing with us and for helping with the investigation

    -Zak
    Last edited by zeroexception; 02-13-2015, 01:26 AM. Reason: fixed link

    Leave a comment:


  • replied
    Hey haggler2,

    Does it work on 4.6.1?

    Leave a comment:


  • replied
    This looks really interesting. I just tried it on the 4.7 github branch (because of the added GearVR support) and it says "This map is using externally referenced packages which won't be found when in a game and all references will be broken. Performa map check for more details. Would you like to continue?"

    I clicked continue and get a black screen for standalone game and UE4 freezes

    Leave a comment:


  • replied
    Originally posted by TheJamsh View Post
    Thanks for this Jacky; and Omar: you're a life-saver.

    Vehicle / Character possession through network is turning into a nightmare, I'm not the only one struggling with it working reliably it seems.
    Glad you found it useful, James! And yeah, i've given up on networking for a while as it pretty much boiled my brains and i'm busy with something else right now. :\

    Leave a comment:


  • replied
    Thanks for this Jacky; and Omar: you're a life-saver.

    Vehicle / Character possession through network is turning into a nightmare, I'm not the only one struggling with it working reliably it seems.

    Leave a comment:


  • replied
    Ok it turns out this is a whole lot more complex than I hoped it'd be. I'm almost making a trip through half the engine to figure out what the hell is going on...
    I also tried to duplicate the destroy behaviour without actually destroying it but this did not result in a working solution either. I think the reason why Possess works after a Destroy is because the Destroy immediately announces the removal to all the net players.

    Any UE dev around here that knows anything about this problem?

    EDIT: Posted on the AnswerHub: https://answers.unrealengine.com/que...-function.html
    Last edited by Omar007; 12-26-2014, 01:30 PM.

    Leave a comment:


  • replied
    Originally posted by Jacky View Post
    Edit: There is an issue that comes with the delay. If you hit E more than once until delay is over you spawn multiple characters > posses the latest one > the rest still stays in the level. DoOnce after E that gets reset after delay should fix it though.
    Yea I realized that as well when I left to do other stuff. Didn't had the time to fix it though. I have some more time right now to dive in a bit deeper and otherwise I hope I'll figure it out tomorrow.


    EDIT: Did some more digging around and tried things with Force Net Update as well as SetPawn(..) as I noticed RestartPlayer calls this explicitly before Possess is called (wrapped this in a blueprint class so I could use it outside of C++ code). Sadly, nothing I tried so far has worked.
    I ended up searching around the forums and AnswerHub to see if someone else reported anything at all and it would appear someone has the exact same issue: https://answers.unrealengine.com/que...ossession.html
    Funny enough, during my own testing I established the same thing as he did; destroying the Sedan first makes the possess work just fine...

    Will continue work on this tomorrow. Good night and have a Merry Christmas
    Last edited by Omar007; 12-25-2014, 08:27 PM.

    Leave a comment:


  • replied
    Thanks a lot for the update, Omar. Feel free to post this issue at AnswerHub as a bug when you are convinced that it is not expected behavior.
    I will be replacing my project with yours in the first post, since yours is easier to implement and works with MP too(i'll also upload it to my dropbox account just in case.)

    Let me know if you(or anyone else) makes any additions so that i can update the links.

    Thanks again.

    Edit: There is an issue that comes with the delay. If you hit E more than once until delay is over you spawn multiple characters > posses the latest one > the rest still stays in the level. DoOnce after E that gets reset after delay should fix it though.
    Last edited by Jacky; 12-25-2014, 03:11 PM.

    Leave a comment:


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

    Leave a comment:


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

    Leave a comment:


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

    Leave a comment:


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

    Leave a comment:

Working...
X