Pawn being spawned beneath the ground when teleporting

Hi there. I am creating a mini-golf game and I have encountered an issue with the respawning of the player when they go out of bounds.
I have a vector that gets updated every time the player hits the ball and when it hits the out of bound trigger, it teleports the player to the last position the vector got updated. The values appear to be correct when placing an object at where the Z axis was recorded but the ball is still being teleported beneath the course and into the void. I have attached screenshots to hopefully give some context. Any help would be appreciated.
Thanks.
This video shows what I am experiencing, the blue text is a print statement I call when I want to check their vector. The values that appeared are located above the course and shouldn’t cause the player to teleport underneath it: https://youtu.be/baVhqAJnQ3Q


Screenshot_296

Hey @JuciJosh

can you show how you set up your GolfBall blueprint

Hey @L1z4rD89

Sure, the blueprints are fairly long so hopefully you can make out what’s there.

If you need me to zoom on anything, let me know.

I may have found a work-around solution.

I get a reference of my golf ball, disable its simulation before the teleport, then re-enable it after a .01 second delay.

That appears to solve the spawning underneath the ground issue. I saw on other forums mentioning that the spawning cannot even happen due to its a simulation of a moving object so I thought “why not disable it and then re-enable it to circumvent that issue?”.

It seems to have paid off. I’ll attach an image of how I did it, please let me know if this is something you would’ve thought of too.

Thanks again.

Have you tried to uncheck teleport?

Hi @Shunitzo

Thank you for your suggestion.

Although I appear to have solved my problem through my method above, I just tried your method and that unfortunately appeared to still spawn the ball beneath the course.

I figure if the object is no longer considered a simulating object, it can be teleported. Which led me to my solution by temporality disabling the physics simulation during the milliseconds during teleporting the player.

Thanks again!

1 Like

Hey @JuciJosh

  • your solution should work
  • what @Shunitzo told you
  • another method would be to add a small Z amount to your coordinates
1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.