Add World Offset - Overshooting issue

I Have:

  1. A platform
  2. A target Vector (not constant - now, is getting updated with press of a button)

My Aim:

  1. A platform looks at a target vector
  2. A platform moves back from target vector
  3. A platform returns to the location at step 1 (the location - before the initial move backwards from target vector)

Problem:
I have implemented 2 ways of doing this, using:

  1. Set World Location ( YELLOW platform)
  2. Add World Offset (RED platform)

Set World Location works perfectly, but, i prefer Add World Offset, since ,
Add World Offset, allows me to implement the effect of other factors on the platform.

Add World Offset as it is noticed on gifs, overshoots and after many activations - moves to the center of a target Vector, even considering i implemented it going back the same amount as going forward.

I want:
I want, RED platform, which moved using Add World Offset , to not overshoot, and come back to it’s initial position after move on step 2.

Thank you in advance.

Shots below:
2 gifs - from 2 perspectives
2 Screenshots - parts of Blueprints, where they differ

cam1
cam2


Hey PurpleMan! Welcome to the Forums!

So the Add World Offset is going to be adding World Offset to its Current Location. So if the platform doesn’t make it back to its original position first, you’re kind of stacking your offsets. Say you offset by 5 from 0. Before it gets back to 0, it gets activated again at 3. Now the offset goal is 8. You see what I’m saying? You could try setting some kind of reference point before moving, subtracting the distance to that value from the new offset on the second use, basically zeroing out that value before setting the new offset?

2 Likes

Hey @PurpleMan

do you want your platforms to move the same way over and over or do you want to alter the movement with different actions?

Another solution could be InterpMovement:

And if you set your Start and EndLocation like this:
image

You can even drag them around in your level

1 Like

Hello! Thank you :smiley:
I will try to implement it today in some way and come back here with a result :+1:

Hello, thank you for reply :smiley: ,

Yes, i would like to be able to change the direction to which the of platform moves.

Thank you so much for such a detailed explanation, i will try it today and see, if it is what i am looking for.

1 Like

Thank you for this notice, i decreased the frequency of activation and it seemed to fix the issue partially, although it still acts weird on high speed frequency, but i will experiment more on it.

Also, do you know how Add World Offset function works?
Does Add World Offset just summarise the vectors and then activates the result in Set World Location?

Thank you so much for this detailed advice, i was happy to discover the InterpMovement, because i have not heard of it prior.

I seems to work fine now, i will experiment with it further and see if this implementation fits with the rest of the mechanics.

Also, do you know how Add World Offset function actually works?
Does Add World Offset just summarise the vectors and then activates the result in Set World Location ?

1 Like

AddWorldOffset will use its input (DeltaLocation) and add it to the current location.
So if ActorLocation = 500, 500, 20 and DeltaLocation = 0, 0, 100 your Actor will be at 500,500,120

2 Likes