MOBA camera and character movement

The official documentation is usually referring to games that are single character (or swapping between single characters), where if you’re pressing WASD you’re moving the character, and your camera at once, and when you swap to say a vehicle or a mounted weapon, you then possess that for control. It’s not intended to control multiple at once, and when you attempt to it fails. With possession, you control one actor anyway, so if you need to grab a group of units, how do you handle it?

of course, obviously, because its attached
but, can i detach spring_arm with a camera from possessed character, and attach it to camera_pawn to operate?

You can detach it and reattach it to other things, but you would then be handling attachments of the camera repeatedly, and this is entirely fine for something where you’re handling only one entity at a time. Though if you have more than one unit, your inputs won’t be read at all except on the pawn you possess.

I agree that the tutorials don’t do exactly what’d be needed for this use case, I usually give resources that can be built upon and adjusted for specific use cases. They were more of a “as close as I can explain the concept without writing up a MOBA camera system”. There’s no “right” way in this case, if possession seems better for your use case, go for it! It’s more based on keeping different component sets compartmentalized and modular so it’s easier for you to add content later down the line. Which you can still 100% do with the possession style.

1 Like