Setting up the TPM Component on a Player
Last updated
Last updated
Applying a TPM Component to a Player is a different than applying it to an AI as it is a required component for any player damage scripts or the included General Target Bridge script, which give AI the ability to send damage to the player. For this tutorial, it is assumed that you have applied the General Target Bridge script to your Player, or at least a Player Damage equivalent script. This will automatically apply the TPM Component to your Player.
When the TPM Component is first added, you will have a warning message at the top of the component.
To resolve this, you will need to open the TPM Settings and apply a bone transform form inside your player to the Transform Source.
Note: It is recommended that this is one of an Player's spine transforms as these typically have the best results and remain consistent.
You will then see a Gizmo drawn on your Player object indicated by a red sphere by default.
Note: You can then make any adjustments using the Height Modifier within the TPM Component and the changes will be seen on the spherical Gizmo.
Important: Ensure that the gizmo does not go into the ground or go above the Player as this could make a target undetectable to AI.
Ensure everything is working correctly by watching the Target Position Modifier point during runtime. If your character controller supports crouching, ensure the position of the point properly adjusts to the height changes as it should continue to follow the set transform.