Download

Need help creating a "leash" type mechanic

Hello,
I’m trying to create a mechanic for a first person game in which the player toggles between being a human, and being an alien that is attached to the character.
Basically, when the player activates the ability and “becomes the alien” that is attached to them, I want to create a sphere collision with a radius of 1000 centered at the original location the player was at when they activated the ability. If the “alien” then goes beyond the range of the collider, the player snaps back to the original location.

Have you tried attaching it with a Spring Arm?

Another guess would be to gradually “AddActorWorldOffset” to the Alien towards the Human when he gets too far away.

Another guess would be to multiply the movement input of the player by a number between 0 and 1 depending on how far he is from the least origin (0 being when he’s the further away).

So just to clarify, I don’t need the player to see the “alien”… it’s essentially just putting a post process effect over the camera and disabling all my abilities.
I tried setting up a spring arm with a second camera attached to it, however there were some problems. I was switching between them by de-acting one and activing the other, and that worked… however Im not sure how to set it up so that my player pawn stays in place and I just move the camera on the spring arm.