Whenever an pawn with the Floating Pawn Move Comp runs into a teleport triggervolume, it relocates correctly, but then launches the pawn with a velocity equal to the distance of the teleport start and end positions.
I don’t want it to fly off, just teleport with the same velocity. I’ve tried using Teleport and Set Actor Location w/ teleport checked nodes. Is there something I’m missing?
Make your own blueprintable component for floating pawn. And implement code that teleports and does not launch it. I did not teleport floating pawn actors, so i do not know if there is fix in that component, most probably nobody thought about is, so you need to add that code yourself. And easiest way is to make own floating component. There are some tutorials about this on yt.
I got this same issue recently. I think it is due to the fact that FloatingPawnMovementComponent calculates velocity by a delta between the last frame and the current frame. In TickComponent of FloatingPawnMovementComponent.cpp you can see the issue here.
// Update velocity
// We don't want position changes to vastly reverse our direction (which can happen due to penetration fixups etc)
if (!bPositionCorrected)
{
const FVector NewLocation = UpdatedComponent->GetComponentLocation();
Velocity = ((NewLocation - OldLocation) / DeltaTime);
}
I have been following Nawrot’s suggestion of making a new movement component just to know what is going on in there, but you could also probably set the movement mode to None or find another way to skip the update as seen below and skip updating the velocity on the frame after the teleport and that could do it, but is pretty hacky imo
Hey, after running into the same problem and finding this post when I was stuck, though its an old thread, I will share how I solved it for anyone else running into the same issue when teleporting a floating pawn.
So basically I couldn’t not get it to not be launched into oblivion, so my solution was to store my variables in a Game Instance and have my teleport, destroy my player character and respawn a new one at the new location. Worked perfect for my needs and my HUD doesn’t loose any scoring because of the game instance.
Pretty much its the same concept as checkpoint but for teleporting.