Announcement

Collapse
No announcement yet.

Smoothing out an integer float flow

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

    Smoothing out an integer float flow

    Hi. I am total noob and cannot get to get my float change smoothly to get a smooth transition when I start accelerating with my spaceship.
    Im attaching my graph and a demo video https://youtu.be/kX6LCbZvUiw
    If anyone take their time to point out what Im doing wrong, thank you very much. I still have very basic understanding about this stuff.
    Last edited by Generica; 11-28-2017, 12:24 PM.

    #2
    Start your troubleshooting by applying some simplifications. For example, why are you driving Finterp's Interp Speed with a Timeline? Finterp is already interpolating between a current value and a target value, using a linear timeline to drive the Interp Speed adds interpolation on top of interpolation. Not sure this is what you want.
    CTO | Head of VR Development - Visit us at http://humanxr.com
    My UE4 Tutorials (mostly VR): https://goo.gl/GUvDyV

    Comment


      #3
      Hey, imo, it would be better to use the "FInterp To Constant" because it interpolates between numbers in a constant, linear way. (If that's what you need ofc).

      I also made a video for you with how you should use both "Finterp To" and "FInterp To Constant", side by side: https://youtu.be/anvtov4AVMQ

      vr_marco is right. You probably also need to simplify your stuff.

      Comment


        #4
        Thanks guys for the replies. Maybe Im doing this wrong? I did like in Coxis's example but it still, reacts immediately. Here is my example. Am I even using the correct nodes for that thing? When I press throttle, it should slowly ramp up to 2 or something. https://www.youtube.com/watch?v=u5xHc3FZNMw

        Comment


          #5
          Originally posted by Generica View Post
          Thanks guys for the replies. Maybe Im doing this wrong? I did like in Coxis's example but it still, reacts immediately. Here is my example. Am I even using the correct nodes for that thing? When I press throttle, it should slowly ramp up to 2 or something. https://www.youtube.com/watch?v=u5xHc3FZNMw
          Hey Generica, can you show us the entire blueprint? I get the feeling that your stuff just rotates when you throttle your engine, and I'm not sure you want that. :P

          Also, your target value for the FInterp is 0. Not sure you want that either.
          Last edited by EU_Coxis; 11-28-2017, 12:58 PM.

          Comment


            #6
            I've played with that value but I did not manage any good outcome. Im attaching my graph. Basicly what I want to do is, taking movement and rotation speed, add pitch multiplier from that, and I want it to increase the pitch even more, when I start accelerating, and do that in a smooth fashion. Thanks for the reply
            https://i.imgur.com/u77pv2P.png

            Comment


              #7
              Originally posted by Generica View Post
              I've played with that value but I did not manage any good outcome. Im attaching my graph. Basicly what I want to do is, taking movement and rotation speed, add pitch multiplier from that, and I want it to increase the pitch even more, when I start accelerating, and do that in a smooth fashion. Thanks for the reply
              https://i.imgur.com/u77pv2P.png
              Hey, I'm gonna assume that you've used this tutorial to make your ship: https://www.youtube.com/watch?v=WK4WGVK1vTQ

              Because I can't see your entire blueprint (I have no idea what's happening on the left part from your screenshot), I've made one of my own with kinda the same setup. Now, I'm pretty bad at piloting my own ship, but you should be able to get a feeling of it.

              Here's a video of it: https://youtu.be/8yquN06lbvw

              You can see and hear it flying in a demo, as well as see the entire setup. I hope this will get you on the right track.

              About rotating your mesh while accelerating, you can do that separately, but you'll have to do that using the interpolated values as well.
              And you'll need to re-position your thrusters as well. Also, be careful where you place your thrusters and how you rotate them, because their position and rotation will affect the physics of your ship.

              Hope this helps you in your challenge.


              Edit: Played a little more with my ship. Made a few changes. Enabled gravity on the mesh, so it gets pulled to the ground and multiplied my Up Thruster strength by 10, so it can actually lift off the ground.
              Also, I've placed the sound pitch thingy on the Event Tick and taken into account the interpolated value for the Up thruster as well.

              Here's a demo, as well as the blueprint changes: https://youtu.be/34oQlU9Qy9I

              It's actually pretty fun to play with it, even tho I'm a bad pilot and crashed a few times and even fell off the map. x.X
              Last edited by EU_Coxis; 11-29-2017, 08:40 AM.

              Comment


                #8
                Originally posted by EU_Coxis View Post

                Hey, I'm gonna assume that you've used this tutorial to make your ship: https://www.youtube.com/watch?v=WK4WGVK1vTQ

                Because I can't see your entire blueprint (I have no idea what's happening on the left part from your screenshot), I've made one of my own with kinda the same setup. Now, I'm pretty bad at piloting my own ship, but you should be able to get a feeling of it.

                Here's a video of it: https://youtu.be/8yquN06lbvw

                You can see and hear it flying in a demo, as well as see the entire setup. I hope this will get you on the right track.

                About rotating your mesh while accelerating, you can do that separately, but you'll have to do that using the interpolated values as well.
                And you'll need to re-position your thrusters as well. Also, be careful where you place your thrusters and how you rotate them, because their position and rotation will affect the physics of your ship.

                Hope this helps you in your challenge.


                Edit: Played a little more with my ship. Made a few changes. Enabled gravity on the mesh, so it gets pulled to the ground and multiplied my Up Thruster strength by 10, so it can actually lift off the ground.
                Also, I've placed the sound pitch thingy on the Event Tick and taken into account the interpolated value for the Up thruster as well.

                Here's a demo, as well as the blueprint changes: https://youtu.be/34oQlU9Qy9I

                It's actually pretty fun to play with it, even tho I'm a bad pilot and crashed a few times and even fell off the map. x.X
                Thank you very much man, helped me a lot. Everything works great AND I know how finterp to constant works now. Thanks If only this trick would work to smooth out physics objects linear velocity.

                Comment


                  #9
                  Glad that helped!

                  for vectors you can use Vinterp.
                  Last edited by EU_Coxis; 11-29-2017, 06:41 PM.

                  Comment


                    #10
                    Originally posted by EU_Coxis View Post
                    Glad that helped!

                    for vectors you can use Vinterp.
                    Well I actually managed to get the velocity working by converting vectors to floats, is that a bad practice? Should I rewire my graphs to avoid such conversions?

                    Comment


                      #11
                      Originally posted by Generica View Post

                      Well I actually managed to get the velocity working by converting vectors to floats, is that a bad practice? Should I rewire my graphs to avoid such conversions?
                      Well, I guess you can do that as well. But it gets messy. Maybe just let it be and just comment it "to review this again in the future"

                      Comment


                        #12
                        Originally posted by EU_Coxis View Post

                        Well, I guess you can do that as well. But it gets messy. Maybe just let it be and just comment it "to review this again in the future"
                        Great idea. Thank you. Cheers

                        Comment

                        Working...
                        X