is there a way of using playercontrol’s posses on actors. I want posses different actors with the same playercontroller during runtime but it only works for pawns.
Is there a way of using playercontrol's posses on actors. I want posses different actors with the same playercontroller during runtime but it only works for pawns
All actors that you want to possess HAVE to be derived from pawn class. Pawn is just a regular actor that can be possessed (and a bit more, but irrelevant for this discussion).
You can reparent your actors into pawns by going to your actor and doing File->Reparent Blueprint. This will prevent you from losing all your work on the existing actors and will automagically make them possessable by controllers.
Now, for your purposes lets say for some reason you do not want to make them pawns but you still want to control them (say something like an RTS game). You can do that through events. E.g. lets imagine you have a camera pawn that you are already possessing and are looking at your map from the top (RTS style). When you click on your actor that you want to move, you can save a reference to that actor in your player controller. When you issue a move command you will call either an event or a function (in case of interfaces) on your actor reference and tell it to move. The movement implementation is of course up to actor itself.
TL;DR: If you want to POSSESS actors they HAVE to be pawns, but you dont have to possess them to make them do things.
Glad to help, please accept the answer if it helped!
Thanks alot man, you have definitely made some things clearer now. Thanks. what I actually wanted to achieve was to have some functionalities implemented on my playerconroller so that whenever I possess a different pawn i can use that functionality on the current pawn.