I was trying to teleport my character 30 units above the ground, but noticed that nothing happened. Then I did some testing and saw that teleporting anything less than 46 units automatically places your character on the ground. I assume this isn’t a glitch but rather a is a built-in thing so characters can teleport on the ground correctly, but what should I do if i want to teleport slightly above the ground?
You can try this yourself by adding the below code to the third person template. Change the Z value to 50 and suddenly the player will teleport.
Not really sure where you’re getting at. The issue is that spawning slightly above ground results in the character being teleported on the ground. For example, if the ground is at 0, teleporting the character to 0,0,10 will actually teleport him to 0,0,0. This goes for 0,0,20 and 0,0,30 and 0,0,40. If I teleport to 0,0,50, the character will actually go to that exact spot then fall down.
I figured it out. CharacterMovement, the component that Characters have in them by default, will automatically move the character to the ground when it is teleported slightly above or below the ground. I had to set MovementMode to None, move the actor 30 units above ground, then set MovementMode to falling for the teleport to work
Hi I was experiencing this issue too! Turns out that 45 units is determined by the STEP HEIGHT in the Character Movement Component. Posting this if anyone else is wondering! Lowering this value reduces the snapping height and makes the script work of OP