Third-person standard character setup
To set up a third-person standard character, perform the following steps:
- Open the Package Manager Window (Window > Package Manager) and select the Character Controller package.
- Open the Samples tab, and then select Import to import the Standard Characters assets in your project. Unity adds the standard character files to your project, under the
Samples/Character Controller/[version]/Standard Characters
folder. - Create a subscene, if you haven't already.
- Navigate to the
Samples/Character Controller/[version]/Standard Characters/ThirdPerson/Prefabs
folder. Drag the ThirdPersonCharacter, ThirdPersonPlayer, and OrbitCamera prefabs into the subscene. - Select the ThirdPersonPlayer GameObject.
- In the Inspector, navigate to the Third Person Player Authoring component and under Controlled Character, set the ThirdPersonCharacter GameObject. Under Controlled Camera, set the OrbitCamera GameObject:
- Navigate to the
Samples/Character Controller/[version]/Standard Characters/Common/Scripts/Camera
folder. Drag theMainEntityCameraAuthoring
script onto the OrbitCamera GameObject: - Make sure your scene has a camera GameObject that isn't in a subscene. Drag the
MainGameObjectCamera
script onto the camera. This component marks the camera as the GameObject that must copy the entity marked withMainEntityCameraAuthoring
every frame: