# Targeting Component

## Event Graph

Gets the spell component for later references and create a widget the targeting dot which is used the owner is targeted

there are also debug keys to show the functionality of this component, please replace with your own input

<figure><img src="/files/NPcMTS2Xf0xGSFFOmdGL" alt=""><figcaption></figcaption></figure>

## Functions

<mark style="color:purple;">Select Previous Target</mark>

Tries to find any target to the left of the already targeted pawn

<mark style="color:purple;">Try Target</mark>

Tries to trace from the camera manager forward to find any target crossing the crosshair. If failed to get the camera manager, it will look for any camera component inside the owner

<mark style="color:purple;">Lock Camera</mark>

Used by the tick, rotates the camera towards the target

<mark style="color:purple;">On Target Destroyed</mark>

When the target dies, disable the targeting logic

<mark style="color:purple;">Rotate when Actor/Rotate hen Character</mark>

They do the same, but one is looking for an actor which is very generic, and the other is assuming the owner is a character

<mark style="color:purple;">Cancel Targeting</mark>

When the button is pressed to find a target, but a target is already locked then it cancels the targeting logic

<mark style="color:purple;">Select Next Target</mark>&#x20;

Tries to find any target to the right of the already targeted pawn


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://digital-dungeon-assets.gitbook.io/digital-dungeon-assets-docs/spell-system/interactive-blocks.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
