World Location Z is mismatching between the editor and the gameplay

Hi!
For some reason when I set an object to say z = 150, and then in the code use a Vinterp in order to smoothly spawn it to z = 150, the real value is different. You can see the location is equal (the numerical values), but really it is two different locations.

Editor:

Gameplay:

How can I fix it? thanks

It’s quite likely your code :grimacing: can you show it?

Sure!

This is the update interpolation

This is the initialization

The idea is that it’s simply like a fortnite wall spawning, but it spawns from the ground with vinterp, there is both a wall and a kind of ball so I made the target height depend (if it’s -1 then its just the objects height otherwise its a param)

This is the ball

Where is ‘animation target’ coming from, and what is height target?

Animation target is a variable that’s exposed and is set to the mesh that we want to animate.
And height target is z that we want to reach, usually the value is supposed to be 0, but in the ball example I want it to be in the air so I want it like 130 above ground

The Animation Target is set in construction


1 Like

Hmmm not sure, sorry :melting_face:

I would try it without the animation target first, just to get the ball where you want it. Then go back to it later, just to get that out of the picture.