Can I switch between actors and pawns?

I’m trying to switch between a camera that moves above the map RTS style and a third person character. Any help in this is greatly appreciated!!!

While you cannot possess a non-pawn actor, you can switch cameras with:

image

Feed the camera actor as New View Target. You also get to choose how long it takes, so you can have an animated transition. You may need to Set View Target again to the Pawn later on.


Alternatively, make the camera a Pawn, too. This is useful in case you want to have more control over that camera behaviour. I worked on a couple of RTS projects and having cameras as Pawns does make sense as you get access to control rotation. Consider it. You can reparent the class of any actor like so:

image

2 Likes

Thank you very much for the response!

1 Like

Oh snap! Alright then! Thank you!

1 Like

When I possess the third person character and move around it seems to still move the RTS camera pawn as well. I have so many questions ugh. So can I have two separate “controllers”? I have the Get Player Controller, could I use that to control the 3rd person char and then have a “RTS Controller” that I could Un Possess when controlling the 3rd person and repossess the RTS controller when using the RTS Camera pawn? Please let me know how I can repay you for answering my questions. I feel guilty for asking so much. I have tried googling and youtubing these questions but it is a challenge for me to sift through the applicable content.

When I possess the third person character and move around it seems to still move the RTS camera pawn as well.

Sounds a bit odd, indeed. How do you know the RTS cam is being moved?


You’ll need 1 controller only. The movement implementation goes into the Pawn. If the possessed Pawn has no movement implemented, it will not move. It shouldn’t at least. Pawns that are not being possessed are unable to process input.

1 Like

I recorded a video now I’m just trying to find a way to get it to you!

What script do you have implemented in the RTS cam? Something is Ticking?

1 Like

Share video privately

You can invite others to view your private video by entering in their email addresses below. Invitees must sign in to their Google Account to view your private video.

Do you have a google account I can tag you in?

Yes I do! It’s the mouse movement

That’s why it can move. Generally speaking, when you deal with Pawns, you want to use Movement Input, not Tick - many reasons, too numerous to list.

Your character is using movement input to move; since the extra camera is also a Pawn now, we can move it properly with movement input as well!

image

This way we do not rely on Tick executing all the time.


Also instead of Set View Target on Begin play, you can have the camera be automatically possessed:

image

Disable this on the character. This way you’ll start with the camera possessed.

1 Like

Thank you so much!

I’ll just clarify that you can, absolutely, still use mouse to create a movement behaviour. Nothing should also stop you from teleporting the pawn. It all depends on what kind of movement is needed.

1 Like

Ok cool :slight_smile:

We don’t know what the problem is, it’s a bit irritating… :sweat_smile:

2 Likes

I also have around 14 promised coffees / beers waiting for me in the PMs - chuffed about that. One day I’m going to cash it all in.

Contributing too much risks hitting buffer overflow, it’s @Everynone1 from now on. Not sure what is going on but can’t edit my profile, I do have my suspicions, though.

@AntiGravity You also changed your name, I only recognised you because you’re the only user with a hidden profile, ha. Dead giveaway.


There I fixed it by faffing around.

2 Likes

Thanks for the pro tip! This community is awesome. I completed GameDevs Unreal Engine C++ Developer course but it seems like blue prints are about a million times more popular. I really wanted to get proficient at programming but visual scripting will do I suppose. After I get a lot of the blueprints done I’d like to try and duplicate it in Visual Studio and try and get it to work like that. So I’ve made a bunch of C++ classes and have all my BP’s based on the corresponding C++ files. If you guys can know of any good websites or YouTube channels that specialize in C++ that would be so freaking cool. Thanks again for the help! I hope to pay it forward one day like you guys.

Wow thank you for your input! I’m taking it to heart :muscle:

1 Like