I have a teleporting ability from a projectile that sometimes breaks my character's movement

Hello! Funny enough it has low repro and I couldn’t actually replicate it in the video, but still wanted to give you some context. The player can trigger a projectile and then trigger it again to teleport (I just move at location with teleport checked) at the projectile’s location. It’s handy for navigation but creates this game breaking bugs. I already did an “invalid location” check if the projectile is too close to the ground but still the issues happen.

So when things break I guess the player’s capsule spawns inside other collisions and the player starts sliding like he is receiving input on an axis. Other times everything seems ok on controls but the player cannot walk up stairs. All these ruin the fun of using the mechanic.

My game is only blueprints and I need your help with an fix on this one. Any ideas?

1 Like

Can you share how the check is currently done?

Nothing fancy, just a line trace from the projectile towards bottom. If it’s half of the player’s height then it’s valid.

Try a capsule trace centered on the target location. Check above, below and radius.

I would like the location to adjust and not just return invalid as I have a lot of caves and weird shapes in the environment. I do not know how to check for an available bounding box location nearby, if there is even any available on a decent nearby threshold search.

An alternative would be to spawn a dummy actor and select try to adjust location. But there is no real control to adjust the search radius.

A last resort could be to trace capsule in a radius to try and move to the first valid spot. Not at pc at the moment. I could share a bp later showing a quick way how it could be done.

you could try ProjectPointToNavigation if you use NavMesh. EQS querys are also good

I thought of that but the player can use the teleporter to go even where there is no NavMesh and also to teleport in the air. I need something like EQS but for collisions.