No announcement yet.

Have I checked the distance correctly?

  • Filter
  • Time
  • Show
Clear All
new posts

    Have I checked the distance correctly?

    I'm trying to find the distance between two actors but the result is not what I was expecting, Have I found the distance correctly?

    Here is the blueprint:
    Click image for larger version

Name:	Screenshot061.jpg
Views:	1
Size:	58.6 KB
ID:	1180366

    There is already a function that returns distance between actors (I don't remember the exact name right now but probably something like Get Distance of Actors).

    If you want to find the distance between two vectors (GetActorLocation) then the formula is length(VectorA - VectorB) so you are close, simply get rid of the GetDirectionVector one and subtract them instead.

    4.10 Update! -> [Community Project] WIP Weather & Ocean Water Shader
    WIP Interactive Water Shader, WIP 2D Water Sim
    WIP FFT Ocean w/ Foam, Quad-tree Infinite Ocean LOD


      You were right on both counts, there is a node called "get distance to" that takes object parameters but you can also subtract the two vectors like you said. Cheers!