Download

Mirroring the player's actions

Hello–

I’m pretty new to this and am trying to figure something out.

I’m currently using a standard first-person character blueprint to walk around in my level. I’d like to copy that first-person character blueprint, place the copied character elsewhere in the level, and have that copied character mirror every movement, rotation, and camera rotation that I do when I’m playing as the first person character.

I’ll ultimately attach a scene capture component to the front of the copied character, send the data to a render target, and see the render target material from the perspective of the original FPC; I don’t need any help with this, just thought it might be helpful to give a sense of where I’m going.

So–how do I set it up? Because UE4 terminology is still new to me, an explanation that uses images from Blueprint would be much appreciated.

Thank you!
Julian

@exaptations You don’t need another character, just another camera which sends input to the render target.

You can make a blueprint, with a camera component, which is coded to copy your first person movements. The render target is displayed to you, so you can see what the ‘copy’ camera is doing…

Does that make sense?

@tib_hou How exactly would I go about “copying my first person movements” in Blueprint?

I’m unsure:

  1. how I’d copy that data
  2. how I’d send that data to what I earlier called the copied character
  3. how I’d get that copied character to go about executing the movements once the data is received

Hopefully that makes sense!

@exaptations Although I think there’s a lot of ways of doing this, I was thinking the BP could use tick and watch the world position of the FP and just copy it ( with some sort of translation obviously ).

The FPC won’t actually be moving; the FPC will be stuck in the same place, looking at the render target as it projects the perspective of the copied character (whose movements the player controls). Sorry for these curveballs; the setup is quite complicated!

So to reiterate: I need to copy the data that would normally go into the FPC and instead redirect it toward something else that can move + rotate + rotate a camera. I’m unsure what that “something else” would be, but I’ve been calling it the “copied character” because it would effectively function like a copied character.

@tib_hou or someone else, thoughts?

@exaptations Ok, so it’s basically two FPCs. You’re controlling the one you can’t see, but from the perspective of the one who can’t move :slight_smile:

It is just two FPCs, you can place two of them in the level and set one to auto posses player and the other not. You can set it up so that one takes the keyboard input, but you are ‘sat’ in the other, which cannot move.

I just tried to set it up, but can’t quite find the right combination, even though it seems to be the way forward.

Will post back if I discover anything…

If anyone has any idea how to do this, please do say so! :^)

Figured it out! Thanks all :slight_smile: