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"

Vector Length Limitations

Hey guys, quick question;

I have a character in game that when I press the left mouse button, it spawns a 'ghost' of something. Now I want that ghost's location to be limited to a certain distance from my character (this will stop that ghost from going everywhere around my map).

Is there a good way on doing this?

From what I heard, 'Vector Length' would be the best way to go, but even then, I'm not sure on how to approach this. Assuming everything else is set up, and all that is needed is the ghost location limits, how will I go about doing this?

From how my logic works (which it doesn't), i would assume: - I need to obtain the character world location - Then get the 'ghost' actors location ('Get Actor Location') - I would then have to find a point in between these two (close to the character) - Then if the 'Ghost' is out of these limits, than set its location to that limit (some how)

Hopefully this makes sense to you all, if not, please tell me what I need to elaborate this issue.

Thank you

Product Version: Not Selected
more ▼

asked Apr 27 '15 at 11:51 AM in Blueprint Scripting

avatar image

1 3 4 4

avatar image Narghile Apr 27 '15 at 12:01 PM

Do you want random positions or set positions?


avatar image LindsayG90 Apr 27 '15 at 12:12 PM

Set once it passes the limits

avatar image Narghile Apr 27 '15 at 12:17 PM

OK, if I have you right,

You need to find the distance between the 2 actors. Get Vector Length.

If length over x distance, move ghost back with range.

This is not right, but you are looking for something like this?

alt text


capture.jpg (46.8 kB)
avatar image LindsayG90 Apr 27 '15 at 12:29 PM

Yeah this is what i am after. I need a point in between my character and the 'Ghost' to set as the limits. Then, If the ghost goes beyond those limits, then it will just stay there at that maximum limit (even if i move my mouse around the outside of that limit, the object will move, but NOT outside those limits). .. if that makes sense

avatar image LindsayG90 Apr 28 '15 at 11:34 AM

Hey Narghile! Thanks for the help, but i think i have figured out what i needed... alt text


Now i just have to figure out how to set the new location of the 'Ghost' actor to where it's Last limited location was

And also update it to where my cursor is (without it going passed the boundaries).

Any ideas?

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

2 answers: sort voted first

Worked it out:

Just using a set component to set its location :) Because the character always facing the mouse anyway.

Thanks guys!

more ▼

answered Apr 29 '15 at 11:14 AM

avatar image

1 3 4 4

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


Someone will clean this up or correct a bit, but something closer to this? Off false you would stop simple move to and run your usual movement.

alt text

capture.jpg (100.8 kB)
more ▼

answered Apr 27 '15 at 12:35 PM

avatar image

1.7k 74 38 110

(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