docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    First-person standard character setup

    To set up a first-person standard character, perform the following steps:

    1. Open the Package Manager Window (Window > Package Manager) and select the Character Controller package.
    2. 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.
    3. Create a subscene, if you haven't already.
    4. Navigate to the Samples/Character Controller/[version]/Standard Characters/FirstPerson/Prefabs folder. Drag the FirstPersonCharacter and FirstPersonPlayer prefabs into the subscene.
    5. Select the FirstPersonPlayer GameObject.
    6. In the Inspector, navigate to the First Person Player Authoring component and under Controlled Character, set the FirstPersonCharacter GameObject: Screenshot
    7. Open the FirstPersonCharacter GameObject's hierarchy and select the View GameObject.
    8. Navigate to the Samples/Character Controller/[version]/Standard Characters/Common/Scripts/Camera folder. Drag the MainEntityCameraAuthoring script onto the View GameObject: [Screenshot]
      This component marks the View entity as the entity that your GameObject camera must follow. The View GameObject represents the camera point of the first person character. When you control the look input of the character, Unity rotates the View entity up and down.
    9. 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 with MainEntityCameraAuthoring every frame: Screenshot
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)