Announcement

Collapse
No announcement yet.

FGear Vehicle Physics (v1.2)

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

    Originally posted by lazybitgames View Post

    currently you need to modify the source code for that.
    we are planning to add some setter functions to allow modifying individual wheels in the following releases.
    Thank you. Thank you very much.
    I want to change the height of the suspension on the left and right to create a unique movement.


    Last edited by ymt3D; 01-08-2020, 06:44 AM.

    Comment


      Originally posted by lazybitgames View Post

      currently you need to modify the source code for that.
      we are planning to add some setter functions to allow modifying individual wheels in the following releases.
      This is something that I really need as well. I'm making a car combat game and when a wheel/tire is damaged, I need the properties of each wheel to be able to change depending on its damage state. Looking forward to this for sure.

      Comment


        Do you have a Discord channel / means to chat?

        Comment


          Originally posted by YOHAMI View Post
          Do you have a Discord channel / means to chat?
          i use telegram but i do not prefer it for support, e-mail is more convenient for me. i have a full time job so i can not always chat with customers.

          Comment



            I think Fgear is still a framerate dependent solution, regardless of your custom update rate implementation. For example, when i change the fps to 5 the car barely move forward. Once i enable physics substepping the acceleration will be calculated properly, but then it starts this annoying bouncing effect and cannot be kept on the road.

            The settings of my example project are unchanged, so you should be able to reproduce these problems.


            Here, when i force fps 30 this bike will start acting crazy. I have 60hz update rate set in the fgear/general settings, tho it doesnt matter. I have also test this with physx substepping enabled (on 0.016 max delta), but it has no effect on the problem either.

            Maybe the calculations are off and causing the wheel to penetrate the floor perhaps. For example, in UFGearWheel::myFixedUpdate you will update suspension only once per actor tick, and not use substepping which is strange. You maybe just overlook something in the calculations and not apply the sim coef or substep deltas when required. Could you please verify them?


            When you test networked game with dedicated server, you may want to untick the single process mode, so it will allow the dedicated server run on the default 30fps clock instead. That way you can see the problems with gameplay immediately. By manually force the server to run on 60fps the problems are obviously gone, but this is not the desired solution, since the server is designed to run on 30fps clock, which is not compatible with fgear's custom simulation atm.

            -For network replication .. (if it is problematic) we may rewrite our current approach in the future releases.
            The current server authorative solution (at v1.1) is slugish to control when play online with any latency. You want client side prediction and correction that allows true client side simulation and just apply corrections based on server replicated body data instead. Epic's physics replication may be slightly better, but far from playable.

            e-mail is more convenient for me.
            You will repeatedly answer many questions multiple times, that shouldnt be very convinient for you at all. Discord is the prefered solution for many, since we can not only ask but search previous conversations when looking for answers.

            * 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, thanks for the feedback.

              Originally posted by Konflict View Post
              I think Fgear is still a framerate dependent solution, regardless of your custom update rate implementation...
              its true that fgear is frame dependent(physics slows down when frame rate is low, custom update makes the calculations more precise) yet we made our tests for minumum 20-25 fps and it mostly behaves well over 30fps. generally game physics start to behave badly under 50hz and vehicle physics requires much more precision. fgear uses fixedupdates in unity but unreal has no such feature. we have tried the substepping callbacks of unreal but the raycasts does not seem to be synched with the regular frame updates so the raycast results seem to be incorrect(substepping is an experimental feature may be thats why). frame dependency is a known issue, we will try to address this problem for the next release.

              Originally posted by Konflict View Post
              When you test networked game with dedicated server, you may want to untick the single process mode, so it will allow the dedicated server run on the default 30fps clock instead. That way you can see the problems with gameplay immediately. By manually force the server to run on 60fps the problems are obviously gone, but this is not the desired solution, since the server is designed to run on 30fps clock, which is not compatible with fgear's custom simulation atm.
              fixing the first problem should also solve this.

              Originally posted by Konflict View Post
              The current server authorative solution (at v1.1) is slugish to control when play online with any latency. You want client side prediction and correction that allows true client side simulation and just apply corrections based on server replicated body data instead. Epic's physics replication may be slightly better, but far from playable.
              yes the controls are always relayed from the server or it will be like a local control which feels nice especially for low latencies but conflicts with the corrections from server and seems ugly as the latency increases. we had a lot headaches because of the unreals physics replication issues so this is the best what we could achieve for the first iteration. we will reiterate it regardless(probably not for the next release).

              Originally posted by Konflict View Post
              You will repeatedly answer many questions multiple times, that shouldnt be very convinient for you at all. Discord is the prefered solution for many, since we can not only ask but search previous conversations when looking for answers.
              we will consider it.
              Last edited by lazybitgames; 01-29-2020, 07:08 PM.

              Comment


                about the frame dependency issue, we have successfully implemented substepping support and it is not mandatory, the code detects if substepping is enabled and update accordingly.

                Candescent Games is using fgear for their Lacuna Passage project. you can check the developer log to see some awesome pictures and gifs. they have modified the source for their specific needs and we constantly exchange ideas to make it better. i wish them good luck with their project.

                Comment


                  Thanks for the reply.

                  the code detects if substepping is enabled
                  Is this a feature for next release? When can we expect it to be uploaded?

                  ideas to make it better
                  Do you plan to include those improvements in base code?

                  Probably just a couple of ideas for cosmetics, but turning the getters to BlueprintPure would be helping with better organizing BPs. Vehicle class's components are not marked for blueprint access but you can use meta prioerties to solve this problem with privates. Example:
                  Code:
                      UPROPERTY(VisibleDefaultsOnly, Category = "FGearVehicle", DisplayName = "Mesh", BlueprintReadOnly, meta=(AllowPrivateAccess = "true"))
                      UFGearSkeletalMeshComponent* mMesh;
                  This change would potentitally deprecate some of those dummy getters. Also, controller's rotation is not replicated to server. For instance in Character you can see they pass the 3 axes along with the rest of the movement values, and using a byte packing to minimize load. On that note, just noticed you are replicating individual values for movement, whereas a struct would probably be just as suitable for this purpose and made easier to extending on.

                  Additionally, many components of vehicle should not be mandatory, instead allow us to setup arbitrary vehicle configurations, eg change on the number of wheels without 'disable' any. It is nice to have a 4 wheeled vehicle class predefined, but that shouldn't be the only base class i suppose. It would be easier to setup different kind of vehicles with or without wheels. In fact wheel components could be replaced with other phyiscs forces. Think of boats, bikes and so on!

                  we had a lot headaches because of the unreals physics replication issues
                  Naturally. Everybody does who try networked physics. But we can take a closer look at FPhysicsReplication::ApplyRigidBodyState() for epic's approximation. Tho i understand you have ran into issues with syncing, but that could be a mere version specific issue. Also it appears to gets continously updated which is quite exciting to see, they now include ping in the calculations, and by extending it further it's possible to get a playable solution out of this.

                  (probably not for the next release)
                  Then i have to do it, but merging will be difficult. It would be ideal to strip the replication code in such a way that allows easy modification without refactoring big portions of the code.
                  * 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
                    Is this a feature for next release? When can we expect it to be uploaded?
                    yes, v1.2 is planned to be released this month, we are in testing phase.


                    Originally posted by Konflict View Post
                    Do you plan to include those improvements in base code?
                    some of them are included but we avoid structural and game specific changes.

                    Originally posted by Konflict View Post
                    This change would potentitally deprecate some of those dummy getters.
                    those getters will be needed for c++ users anyway, am i right?

                    Originally posted by Konflict View Post
                    Also, controller's rotation is not replicated to server. For instance in Character you can see they pass the 3 axes along with the rest of the movement values, and using a byte packing to minimize load. On that note, just noticed you are replicating individual values for movement, whereas a struct would probably be just as suitable for this purpose and made easier to extending on.
                    we only replicate inputs in FGearReplicatedInputs struct, the remaining replication is the regular pawn replication + interpolation. which parts of the code are you referring to?

                    Originally posted by Konflict View Post
                    Additionally, many components of vehicle should not be mandatory, instead allow us to setup arbitrary vehicle configurations, eg change on the number of wheels without 'disable' any. It is nice to have a 4 wheeled vehicle class predefined, but that shouldn't be the only base class i suppose. It would be easier to setup different kind of vehicles with or without wheels. In fact wheel components could be replaced with other phyiscs forces. Think of boats, bikes and so on!
                    arbitrary vehicle configurations sound nice but not planned for near future. the structure started with a 4-wheel vehicle sim and evolved around that. even multi axle setups are not fully supported, some of the features are directly developed for 4-wheels. you can fake bikes but motorcycle physics are very different if you want realism so we do not want to enter that region.

                    Originally posted by Konflict View Post
                    Tho i understand you have ran into issues with syncing, but that could be a mere version specific issue. Also it appears to gets continously updated which is quite exciting to see, they now include ping in the calculations, and by extending it further it's possible to get a playable solution out of this.
                    replication will be reiterated in the future releases, we also hope there will be improvements in the epics replication.

                    Originally posted by Konflict View Post
                    Then i have to do it, but merging will be difficult. It would be ideal to strip the replication code in such a way that allows easy modification without refactoring big portions of the code.
                    actually replication related code is minimal and it should be pretty easy to strip it. if you have the v1.0 sources you can easily see the difference, if not drop me a mail.

                    thanks.

                    Comment


                      the latest sandbox demo(there is an additional rc car sample) is available here.
                      here is a preview of the upcoming v1.2, video showcasing a couple of new features:

                      Comment


                        Originally posted by lazybitgames View Post
                        the latest sandbox demo(there is an additional rc car sample) is available here.

                        here is a preview of the upcoming v1.2, video showcasing a couple of new features:

                        Great Job!!!!


                        Do you have release notes?
                        I want to know if I can change individual wheel settings.

                        Originally posted by lazybitgames View Post

                        currently you need to modify the source code for that.
                        we are planning to add some setter functions to allow modifying individual wheels in the following releases.

                        Comment


                          Originally posted by ymt3D View Post
                          Great Job!!!!

                          Do you have release notes?
                          I want to know if I can change individual wheel settings.
                          i will post the full release notes when its released.
                          yes you will be able to modify individual wheel settings, not recommended though.

                          Comment


                            Originally posted by DonCr8tiveMinds
                            Everything seems to be hooked up properly and no matter what I change I can't seem to get the tire skidding to trigger. Engine sound works.

                            fixed downloaded the example and was able to get it to work. Thank you so much ! Great plugin by the way. Cleanly coded and runs fantastic

                            Comment


                              How well would this perform with 30 cars in multiplayer on a dedicated server? Is there client side prediction? Every other vehicle solution I've tried is jittery in MP.

                              How do the cars react to physics interaction? If I were to put a car on top of a large physics object (e.g. transport helicopter) would the car be moved smoothly or would things glitch out?

                              Comment


                                Originally posted by MikeRPG View Post
                                How well would this perform with 30 cars in multiplayer on a dedicated server? Is there client side prediction? Every other vehicle solution I've tried is jittery in MP.

                                How do the cars react to physics interaction? If I were to put a car on top of a large physics object (e.g. transport helicopter) would the car be moved smoothly or would things glitch out?
                                to be honest i am not confident about the multiplayer part yet because we have recently added and it feels a bit laggy at the moment. we built it on top of regular pawn replication + relaying inputs from server + client side interpolation. unreals pawn replication had problems with rotation updates at that moment so we had to use interpolation to make sure the transform is correct but it added an extra small delay. the physics interaction feels nice and natural between vehicles(at least at low ping) but we have not tried that kind of(putting on top of a large physical object) interaction yet. our focus will be on replication for the next release(after v1.2) and we also plan to put a multiplayer demo too.

                                Comment

                                Working...
                                X