What is the best way to transfer partial character control to various cameras that are focused on only taking partial character functionality?

How does inheritance work if I have something directly inherit from the default BP_FirstPersonCharacter Class? I can’t find a definitive answer as to whether the following would happen with the child class:

  • Would it immediately have all of the IMC and IA turned on or not?
  • Would it have all events immediately or not? Or would it need to override for each case first?

The point of the child class I create would be to selectively take SOME functionality that BP_FirstPersonCharacter has (an example would be only taking mouse functionality to pivot and click) while not having access to the rest of it (like not being able to move in the same case as granting only mouse functionality).

1 Like

If you inherit from the player, the child has all of the same functionality. You can ‘override’ the functions in the parent from this menu

But it’s a bit of a crazy way of doing things, because you want less functionality.

A view target is another option

It means you can have an actor BP with a camera in it, and switch to it from the player. You have to stop the player moving before you switch, and by default it has no movement of any kind. It’s very good for showing a door opening ( for example ) if you’re not sure the player will be looking that way.

Best option, I would say, is to make a pawn with camera movement ( they can’t walk by default ). You can use it to control close up interfaces etc, which I what I assume you’re interested in.

When the player walks up to a control panel, you just possess the control panel pawn, and you get a nice close up view with the ability to pan the camera and press buttons etc.

If your player interacts using a line trace, you can put this functionality in an actor component. Which means its a cinch to put that in your pawn also.

2 Likes

Can I get an explanation of how I attach camera movement to a pawn? I created the pawn and can possess it, but trying to add movement IA and IMC isn’t working, guessing that it’s because they can’t move by default like you said. But I’m not sure how else to add movement for a camera.

1 Like

So you don’t want to be able to walk, just rotate the camera, right?

You can enable input in the same way you do in the conventional player.

You only need the mouse movement ( so that’s the same bit that controls camera movement in the normal player ).

Just copying the code from there would be a good start, but you might want to limit the camera movement, so they can only look at the item they are facing.

1 Like

Wow this sure does just work. This is much simpler than what I was trying to do. I’m trying to find information on the pawn class online. Specifically around how it has camera functionality without the camera component. Technically this issue is solved but I want to know how the pawn class has this capability. Do you know?

1 Like

Just by using the ‘pawn’, you already have a load of CPP loaded, so it’s all in there, I assume.

If you’re inheriting from BP_FirstPersonCharacter, the child will inherit all components and functionality by default. To achieve partial control (like only mouse input), override input bindings in the child class and disable or remove the ones you don’t need. Using separate input mappings and conditionally enabling them works well too.

Yeah this is roughly where I arrived at with the method I was originally trying which I didn’t like. But I think that I’ll have to do roughly the same when using the pawn class anyways.