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.