Announcement

Collapse
No announcement yet.

FGear Vehicle Physics (v1.2)

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

    which parts of the code are you referring to?
    In serverUpdateState() just submit the FGearReplicatedInputs struct instead, not the individual values. The second part was about sending controller rotation of autonomous to server, since playercontroller wont' do it. You can find example of this in UCharacterMovementComp.

    it should be pretty easy to strip it.
    The problem always is with merging local changes to marketplace entry updates. Fewer the customizations the better for us, users.

    i am not confident about the multiplayer part
    In blueman's plugin you can find an experiment of implementing a rewind feature for client-side prediction. It's crashing a lot, not resource firendly at all, and not compatible with certain vehicle configurations but it's one interesting approach anyways, you can perhaps derive a finished version. I'm trying an alternative solution by extending on epic's rigidbody replication instead, and resolve some of the jittering/stuttering issues mentioned above.

    * Sharp and responsive Temporal Anti-Aliasing tips and tricks
    * Pitch-shift source effect (DSP) over the network (VOIP)
    * My Portfolio and Developer Blog

    Comment


      Originally posted by Konflict View Post
      In blueman's plugin you can find an experiment of implementing a rewind feature for client-side prediction. It's crashing a lot, not resource firendly at all, and not compatible with certain vehicle configurations but it's one interesting approach anyways, you can perhaps derive a finished version. I'm trying an alternative solution by extending on epic's rigidbody replication instead, and resolve some of the jittering/stuttering issues mentioned above.
      it sounds like the lag compensation approach of source engine but i am not sure if it would be useful in a racing game where things move too fast. today we made some tests and our current replication fails miserably(in some cases) in 4.24 but fine with 4.22. i think it will be wiser to develop an implementation that does not depend on epics replication.

      Comment


        our current replication fails miserably(in some cases)
        In which cases? Could you be a bit more specific?

        I think in FGear 1.1 the clientInterpolation() method going to dismiss what FPhysicsReplication have achieved, since it will calculate a new world transform for the body using the replicated (very old) value. I have this method disabled but the body seems to be replicated fine, since epics replication takes care of it already. Tho it still feels slugish to drive, since no client simulation for the vehicles allowed either way.

        They refactor this replication logic since 4.18 and it's looking different now. Earlier it was enough to simply override a few methods in pawn, but now it's probably a bit more complicated to use, tho essentially the idea remain same. I don't see much changes in 4.24 to FPhysicsReplication, perhaps the issue you see is coming from this change which was supposed to be a fix for UE-75150.


        * Sharp and responsive Temporal Anti-Aliasing tips and tricks
        * Pitch-shift source effect (DSP) over the network (VOIP)
        * My Portfolio and Developer Blog

        Comment


          Hi, We are creating a multiplayer racer and I've been following this for a while now as we have tried all sorts for the last few years to have "smooth non jittery" clients.

          I am hoping that you find some form of working state for multiplayer replication as I'm sure it's not just me who wants to see this but many others and I will happily purchase this. Currently we are developing using BlueMan which seems to be the most viable at current but I have high hopes for FGear.

          Please do keep us updated.
          Cecil B

          Comment


            Originally posted by Konflict View Post
            In which cases? Could you be a bit more specific?
            sometimes clients wheels start to sink or wheels rotate for no reason, this does not happen in 4.22.

            Originally posted by Konflict View Post
            I have this method disabled but the body seems to be replicated fine, since epics replication takes care of it already.
            it seems fine but i had problems with 4.23, it was not apparent at first but after playing a couple minutes the rotation of the vehicle diverges from the server and it is not corrected so the vehicle can start going sideways until a correction happens which do not happen for a long time or until you crash.

            Originally posted by PerfsPC View Post
            Hi, We are creating a multiplayer racer and I've been following this for a while now as we have tried all sorts for the last few years to have "smooth non jittery" clients.
            v1.2 will be released in a short time and after that our only focus will be on multiplayer.

            Comment


              hi,

              v1.2 files are uploaded and pending for approval.
              updated documentations and sample project is also uploaded.
              using the new sample project with older versions may cause problems so please wait for the plugin update.
              i will post a change log when the new version is published.

              thank you.

              ps. i am relocating to another city and i will have limited access to my computer for a couple of weeks so i may not be able to respond quickly as usual, thank you for your understanding.
              Last edited by lazybitgames; 02-16-2020, 10:58 AM.

              Comment


                v1.2 is available now

                CHANGELOG
                • Substepping support
                • Save/Load option(editor only)
                • Sticky tire option for preventing low speed slips (experimental)
                • Custom editor UI elements (for ex. you can see top speeds for each gear in editor)
                • Basic AI Driver component
                • New AITest map for sample project
                • Separate axis mode option for StandardInput
                • Option to prevent tire-ground penetration
                • Sphere casting option
                • An additional rc car setup for the sandbox map
                • Minor improvements and bug fixes

                Additional Notes:
                -Substepping is the recommended approach now.
                -Due to a problem with the unreal editor, it can be problematic to save/load
                from the blueprint editor window. When blueprint window is open and the viewport tab is not selected,
                extra axle components(axles other then front/rear) can not be retrieved so it is safer to save/load from
                regular details panel or make sure the viewport panel is active in blueprint window.
                -If you use separate axis for throttle/brake then you can throttle & brake at the same time.
                -You can call ArcadeAssists::setCruiseSpeed method to set the vehicles instant speed. This could be usefull for rolling starts.
                -Rc cars animation blueprint is copied from unreals own vehicle sample.
                -An additional parameter called RimOffset is added, this will offset the physical wheels laterally in case the visuals do not match(Rc car is an example).
                -If you prevent tire-ground penetration, tires can penetrate the fenders.
                -You can change every value of WheelOptions for each wheel now.
                Changing these values for left and right wheel can be problematic in some cases where
                there is an assumption that left/right wheels have the same value.
                For ex. if left and right wheels have different radius and the difference is more then acceptable ranges
                then the transmission will change gears earlier then expected because gear changes are based on the slowest wheel.

                Comment


                  Hi! Great Update! ThankYou!

                  Comment


                    lazybitgames sent you a PM

                    Comment


                      For anybody looking at purchasing this I can give it 9.5/10 so far.

                      Everything seems really nice and simple enough to work with, I'm looking forward to the future updates to see what comes with the multiplayer updates for replication but short term we have our own Multiplayer Replication platform and seems to sit in nicely and reasonably smooth.

                      The standalone mp replication is a must for clientside prediction (if that is the best way to go?) as for years we have struggled with smooth online play but we are now moving forward at last.

                      Thanks lazybitgames I'm sure we will be in touch on any issues...

                      Kind Regards
                      Cecil B

                      Comment


                        Hey lazybitgames , i need some help for 6 tire vehicle, If i use 4 tire on the blueprint, gear change will be okay, but if i use 6 tire on the blueprint, it will be stuck on the gear 1. I don't know how to fix it.
                        (if you need to know, I copied from the truck animation AnimBP for 6 tire)



                        Thanks

                        Comment


                          Originally posted by Supline View Post
                          Hey lazybitgames , i need some help for 6 tire vehicle, If i use 4 tire on the blueprint, gear change will be okay, but if i use 6 tire on the blueprint, it will be stuck on the gear 1. I don't know how to fix it.
                          (if you need to know, I copied from the truck animation AnimBP for 6 tire)



                          Thanks
                          you duplicate the axles and the sum of the torque share values become 2(1+1).
                          this will confuse some calculations so keep the sum at 1, for ex. 0.5 per axle.

                          Comment


                            Hey lazybitgames ! Another question, i can't use Break Constraint node, is there any way to use it to smash the car? Thank you!


                            Click image for larger version  Name:	break.jpg Views:	0 Size:	308.9 KB ID:	1726430

                            Click image for larger version

Name:	break2.jpg
Views:	81
Size:	299.0 KB
ID:	1726431

                            Comment


                              Hi Supline ,
                              You cannot call mMesh object in blueprint directly. Because it is not blueprint visible. You can call mesh reference with getMesh() function.

                              Click image for larger version

Name:	bc.jpg
Views:	85
Size:	50.4 KB
ID:	1726669

                              Comment


                                Hey lazybitgames i have 2 question/problem (I am constantly having problems because I am trying to drive a strange vehicle)

                                1) The car pulls left after 300-320km. On the video i didnt touch any turn key on the first part of the video, I just press the forward button, but it's try to turn left. (I don't know why and how to fix)
                                2)I Almost try anything to make this car similar to Need For Speed game, like 400km speed Possibility to turn the vehicle left and right when traveling at 400 km speed etc. but now it feels like the car is flying.The car is very difficult to control.
                                3)End of the video i share with you all the settings what i did, I try to make a copy from your Arcade Car BluePrint but it's not work well for me, hope we can find a solution.



                                Thank you very much for your support!

                                Comment

                                Working...
                                X