-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the DTSDemo wiki! If the images are not displayed correctly, open them in a new tab!
- Download the
DistanceTrackingSystemplugin fromFAB, then open your project and enable it in thePluginssection.
- If you downloaded the plugin from another source, place it in the
Pluginsfolder in your project. The plugin path will look like this:YourProject/Plugins/DistanceTrackingSystem
With the DistanceTrackingSystem plugin, you can track distances to Components or Actors. All calculations are multithreaded, significantly increasing performance! Here is a list of functions you can use:
-
StartTrackingDistanceFromComponentToComponent- Tracks the distance from component to component!
-
StartTrackingDistanceFromActorToActor- Tracks the distance from actor to actor!
-
StartTrackingDistanceFromActorToComponent/StartTrackingDistanceFromComponentToActor- Tracks the distance from the actor to the component
-
StartTrackingDistanceFromActorToLocation/StartTrackingDistanceFromLocationToActor- Tracks the distance from the actor to the location!
-
StartTrackingDistanceFromComponentToLocation/StartTrackingDistanceFromLocationToComponent- Tracks the distance from the component to the location!
Inputs:
-
InTrackingInterval-OnTrackingUpdatetrigger interval. A larger interval value improves the function's performance. -
InTrackingLifeTime- Used to automatically destroy the function! If LifeTime expires,OnTrackingStopwill be called; this delegate is only called in this case! -
bInDistanceSquared- If enabled,OutDistancewill output a square distance. This also improves the performance of the function. -
InActor- An actor that is used to calculate distance. -
InActorRelativeOffset- Location relative to the Actor in the local coordinate system. The Actor's scale is also taken into account. -
InComponent- The component used to calculate distance. -
InComponentBoneName- A socket or bone that is in the component and will be used as a point for calculating the distance! -
InComponentRelativeOffset- Location relative to the Component in the local coordinate system. The Component's scale is also taken into account. IfComponentBoneNameis specified, the position will be calculated from the received socket or bone.
Outputs:
-
OnTrackingStart- Triggered immediately after the function is created. All values (distance, location, etc.) are available at this stage! -
OnTrackingUpdate- Called continuously whenTrackingIntervalfires. -
OnTrackingStop- Called if the function'sLifeTimehas expired. -
OutDTC___AsyncAction- A reference to the function object. This is necessary for destroying the function at any time; for example, you can call theDestroyfunction from this reference. This object also stores all the inputs, which you can access at any time! -
OutDistance- Distance between Actors or Components. Available duringOnTrackingStart/OnTrackingUpdate/OnTrackingStop. -
OutLifeTimeAlpha- Value from 0 to 1. Where 1 =MaxLifeTime! You can getCurrentLifeTime/MaxLifeTimefrom theOutDTC___AsyncAction. -
OutActorLocation/OutComponentLocation- Locations used to calculate distance!
You can get some values in Runtime like this
You can destroy a function by calling the Destroy function at any time.
To avoid some problems, set a variable to a function reference during OnTrackingStart and clear the variable during OnTrackingEnd.
Also, destroy the function during EndPlay
You can find a list of all functions here: