Announcement

Collapse
No announcement yet.

RTS Control in Blueprint?

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

    #16
    So I found a function it's an "interp to". The help text for it says it's supposed to help with interpolating a mesh from point A to point B over time. I'm sure I'm setting it up the right way, but if it gets rid of everything I did above that'd be great However right now it is jumping the object from one point to the other where I click.

    Anyone know how to use the function the right way?

    Comment


      #17
      Originally posted by SandmanMike View Post
      So I found a function it's an "interp to". The help text for it says it's supposed to help with interpolating a mesh from point A to point B over time. I'm sure I'm setting it up the right way, but if it gets rid of everything I did above that'd be great However right now it is jumping the object from one point to the other where I click.

      Anyone know how to use the function the right way?

      It is setting it right away because you are doing it on click, you would need to set it over time by using Tick or a Timeline.

      Another option is to use a Timeline to drive a lerp that blends between the 2 vectors, and you would want to get the distance between the 2 vectors, and use it to set the speed of the timeline so he will travel at a consistent speed.

      Comment


        #18
        Originally posted by Shane Caudle View Post
        It is setting it right away because you are doing it on click, you would need to set it over time by using Tick or a Timeline.

        Another option is to use a Timeline to drive a lerp that blends between the 2 vectors, and you would want to get the distance between the 2 vectors, and use it to set the speed of the timeline so he will travel at a consistent speed.
        Thanks Shane, I've attempted setting it up with a Tick, and the mesh continues to jump/flicker about halfway between the origin point and destination. Below is the new setup.

        I'll take a look at the Timeline, but what's a lerp?

        Comment


          #19
          Is this in the level blueprint, or a Class Blueprint? I would get the Statue's Actor location not the Up Vector. In the above shot.

          A Lerp is a Linear Interpolate, it basically just blends between 2 values based off of an Alpha value 0-1. So you just make a Float track in a Timeline, and make the curve go from 0 at 0 and 1 and 1 second.

          You could try something like this.

          Click image for larger version

Name:	LerpMovement.jpg
Views:	1
Size:	98.4 KB
ID:	1049901

          Comment


            #20
            Hi Shane, that is working much much much better. However, the object keeps reverting to the original starting location when the scene starts, even when I try to re-set the new location to the variable at the end of the timeline. Here's what I have below. What I'd like is to be able to take in the new location of the object at the end of the timeline, is there a way for it to register the new location?

            Thanks!

            Comment

            Working...
            X