Friends, I am new to ue5 and I want to teleport.
There is always character teleportation on Youtube, I can handle it easily, but I did not fully understand how to make another object.
I started with the football game
(the ball will touch the trigger box inside the castle and teleport back to its place at the start of the level)
can you help me ?
bluprint :
hey there ! it looks to me like your getting your ball in the world. then your calling the teleport function.
however, the location you want to teleport to. is using the location of the ball. so your teleport will just leave you in exactly the same place.
use a empty actor in the world as a “ball Origin” or something similar and use that.
hopefully it should work.
ive never used the teleport function. you could also SetTransform and tick the teleport bool. but i dont see why it would be any different.
i hope that helps good luck !
beside what sainl1234 said. Don’t you want to teleport the actor you’re overlapping with? If so, get the blue node from the cast instead of getting the ball from the world
Best thing to do is destroy the ball and just spawn a new one at the location of where you need it to be. The cost is very little and you just need to create a little ball spawning machine.
This may not be entirely true. The gamemode or any other actors can have a reference to this specific ball that he wants to keep without the upkeep of updating the reference each time the ball is respawned.
Shaini1234 is right. You are just teleporting the ball to the same current location. Change dest location of teleport function to start of a level(xyz coordinate).
I opened a new actor named “ballspawnpoint” but it still didn’t work Or I can’t
i just tried the coordinate
but it didn’t
Check teleport return value. If it returns false it means it couldn’t fit it there(because of some collision).
Drag the reference from the cast node and plug it in the target for the teleport node.
Also, does that print work when the ball overlaps?
I applied what you said, but the result is still frustration…
So i decided to “ball spawn”
but now the ball has lost its physical properties…
sorry for giving you a headache.
Simulate physics → click okey
thanks <3