Download

How to change parent from Pawn to Pawn inherited BP correctly?

I have “airplane” BP inherited from Pawn - this working fine, but if I desided create custom BP inherited from Pawn and I will inherited from it in order to isolate common properties and functions for different similar objects into a separate parent class something went wrong.

For demonstrate my problem I was transfer blueprints to empty project. Can you help me please?
Flying3.zip (5.3 MB)

You can always change the parent of a blueprint here

Thank you for your answer, but my question was: why when I change parent class from Pawn to empty BP inherited by Pawn contol will be broken.

So you make a pawn BP which inherits from Pawn, and then inherit from that, and you can’t control the pawn?

yes, but can’t control aircraft which inherites from this BP (MobilePawn), but if I change inherits from Pawn I can control correct. (please see attachment). MobilePawn is empty, all enent nodes removed. I’m confused.

I’m taking a look.

First thing, if you have BP_AircraftPawn specified in the game mode, you don’t need any in the level. You have 2 in the level, they serve no purpose. ( I now see they were AI ).

LookUpRate and LookRightRate are not used by the project, you might as well remove them from the pawn. The are causing compile errors.

Ok, MobilePawn derives from Pawn. But Pawn does nothing on it’s own, so MobilePawn will also do nothing by default.

If I use Pawn or MobilePawn as the aircraft parent, I get the same result. I do seem to control it ( I can pan left and right with the mouse ), but I’m not a good pilot.

This is the main problem, why when I change heredity the logic breaks, although it should not

First thing, if you have BP_AircraftPawn specified in the game mode, you don’t need any in the level. You have 2 in the level, they serve no purpose. ( I now see they were AI ).

This is for joystick, I did not have this device, but I think will be useful in future, this is not error, its warning because I not create axis mappings in input devices.

If I use Pawn or MobilePawn as the aircraft parent, I get the same result. I do seem to control it ( I can pan left and right with the mouse ), but I’m not a good pilot.

no no no no, please see the gif controll BP inhgerited from Pawnwhere aircraft inherited from pawn. Aircraft control based on camera position, rotaion action “autopilot”.

I Found diffrences, when inherites from MobilePawn BP_Aircraft include “DefaultSceneRoot”
image
now I will think how to get rid of it.

1 Like