Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Can you get distance from where you click to the player

I was wondering if there was a way to get distance to from where the pawn is to under where the player would click? I want to make it that the line trace can only work with such a range and the way I would think would be able to do this would be the get distance to node by making an actor where clicked to then compare to the float but is there not an easier way?alt text

Product Version: UE 4.8
capture.png (223.6 kB)
more ▼

asked Aug 05 '15 at 04:33 PM in Blueprint Scripting

avatar image

26 10 8 10

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

If I understand you correctly, given the location of the two points (player location and clicked location) you can just subtract one from the other and use the VectorLength node:

alt text

more ▼

answered Aug 05 '15 at 04:48 PM

avatar image

2.1k 64 54 120

avatar image greenday21 Aug 06 '15 at 04:41 PM

Oh my word yes I can’t believe that I forgot about that it’s just what I was trying to do. Thank you.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question