> For the complete documentation index, see [llms.txt](https://sulleyyys-organization.gitbook.io/manuals-of-ccs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sulleyyys-organization.gitbook.io/manuals-of-ccs/advanced-uses/customizing-camera-components/customizing-ecameracomponentfollow-ecameracomponentaim-and-ecameraextensionbase.md).

# Customizing ECameraComponentFollow, ECameraComponentAim and ECameraExtensionBase

Customizing *ECameraComponentFollow*, *ECameraComponentAim* and *ECameraExtensionBase* is pretty simple. You can override these classes to create your own camera components guiding camera behaviours. The following steps take *ECameraComponentFollow* as an example.

1. Right click on Content Browser -> select "Blueprint Class"-> Search for "ECameraComponentFollow" -> click "Select".
2. Rename it as whatever you want. Here I name it *MyFollowComponent*. Open the blueprint class and you can see the "Functions" section on the left side of the blueprint window. There are several implementable functions in this section. You should implement the **UpdateComponent** function, while other functions, if meet your needs, can also be implemented. <br>

   <figure><img src="https://1253177398-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIc7aRtmwmEkkqEJZORmC%2Fuploads%2FGmZGdPxKDpBRhrvA3HUm%2Ffunctions.png?alt=media&amp;token=96c0e635-9c1f-4835-92ef-796679753279" alt=""><figcaption></figcaption></figure>
3. In the **UpdateComponent** function, the first thing you should do is to check whether the follow target is valid or not. Right click on the blueprint and search for "Get Follow Target", you will get the reference to "Follow Target". Then connect it to the *Is Valid* node. Define a new *Do Something* node where you practically implement component behaviour and make a link from "Is Valid" to this node. <br>

   <figure><img src="https://1253177398-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIc7aRtmwmEkkqEJZORmC%2Fuploads%2FUbfTIsyOXpPiSon1bT2j%2Foverview.png?alt=media&amp;token=ba3b0962-cd89-4876-a800-dab4f1046ac3" alt=""><figcaption></figcaption></figure>
4. Write component logic in the new function. For example here I implement a simple top-down view camera. It gets the follow target's location and offsets it with a fixed vector. The result is the camera's location. Node *Owning Actor* is the camera actor that owns this component. <br>

   <figure><img src="https://1253177398-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIc7aRtmwmEkkqEJZORmC%2Fuploads%2FClq8ssn4OG3LfHiOHUUI%2Fmyfollowcomponent.png?alt=media&amp;token=49955472-ae1d-4ea3-b474-f0020905edad" alt=""><figcaption></figcaption></figure>
5. In the camera actor (of class `ECameraBase` or sub-class of `ECameraBase`), specify *MyFollowComponent* to the "Follow Component" property and set "Aim Component" to null. Go to the blueprint where you want to call this camera. Invoke the *CallCamera* node and specify "Camera Class", "Spawn Rotation" and "Follow Target". You can also specify blending parameters if you like. <br>

   <figure><img src="https://1253177398-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIc7aRtmwmEkkqEJZORmC%2Fuploads%2F1RdG7n8frAo1NiR5E2z1%2Fcallcamera.png?alt=media&amp;token=4d612166-d207-44f4-83ce-e555cb172a5e" alt=""><figcaption></figcaption></figure>
6. Run the game and you will see camera now is above the character and tracks its position. <br>

   <figure><img src="https://1253177398-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIc7aRtmwmEkkqEJZORmC%2Fuploads%2F3tjGx8XkXyO9zlNmubpJ%2Ftop-down.gif?alt=media&amp;token=c8381591-fa51-43ca-b2f1-45c1b7e98605" alt=""><figcaption></figcaption></figure>
