I have a character that needs to have an AI controller for movement. Something like an RTS game. It also needs a player controller. So what I am doing now is creating a dummy pawn and attaching it to the character and the playercontroller posses dummy pawn which is attached the playercharacter.
How ever is there a better way to do something like this? Without using the extra pawn?
I have the same setup, and I agree it’s ugly. I did read something that Mieszko wrote a while back that suggested perhaps the intermediate pawn isn’t necessary - that maybe your player controller doesn’t need to possess any pawn, and just relays the commands directly to the AI controller.
I haven’t tried it yet. I was kind of hoping there might be a proper addition to the engine to handle doing this kind of thing more cleanly.
I didn’t try to physically attach it. You can override the default camera behaviour in various ways, by setting the view target directly, or via a player camera manager.
My dummy pawn does nothing at all except relay commands to the AI controller. Like I say, I suspect you can cut it out entirely, but I’m afraid I don’t remember where I read it. I don’t think he provided any explanation of how to implement it anyway.