What makes an actor Autonomous Proxy?

Hey guys. So I understand roles at a pretty good level now. But I feel like there’s still a gap in my knowledge about ROLE_AutonomousProxy. I know that the role of the playercontroller on the owning client is ROLE_AutonomousProxy, but i also heard that the character class that is possessed is ROLE_AutonomousProxy. Does that mean that anything that the playercontroller owns is then autonomous proxy as well? So like if I had a player controller that owned a character and the character owns a gun, would the gun be ROLE_AutonomousProxy? Basically my question is do all of the children in the ownership hierarchy of the playercontroller have ROLE_AutonomousProxy?

Any actor that has SetAutonomousProxy(true) called on the server becomes Autonomous Proxy. Pawns will have this set when Possessed. Role is important for input to be handled correctly by things like the CharacterMovementComponent so it will pick direct input or simulated input. If you want any other Actor to be Autonomous Proxy you should call SetAutonomousProxy(true) on the Actor on the Server. Ownership is used for RPC’s, Replication and visibility purposes it will not change the Role.

3 Likes