x

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"

I want an actor to move to the centre of a trigger box when it collides with it

Hi all,

I'm new to Unreal and trying something slightly audacious. So, similar to something the Gravity Gun can do in Half Life 2, I want an actor, in my case a sphere, to move slowly to the centre of a trigger box and stop when it collides with said trigger box.

In Half Life 2, you can pick up energy orbs and shoot them at "sockets" (we can call them locks) (not the same sockets that Unreal uses) and they stick into them and unlock something/move something etc.

I've been looking up for and I've found many different things that may help but none have so far.

If you need any more information, please ask!

Thank you so much in advance!

Product Version: UE 4.18
Tags:
more ▼

asked Nov 30 '17 at 01:15 PM in Blueprint Scripting

avatar image

Mili90
1 1 1

avatar image Mili90 Dec 04 '17 at 01:09 PM

New Update!

Here's what I have so far. I am trying to make it so that if a fireball (Fireball_BP) overlaps with the Sphere (this is the trigger box), then the fireball will move to the target point which is at the centre of the trigger box.

alt text

capture.png (270.6 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

instead of "==" you can use "Cast to FireballBP" its a little more accurate. Also what i would do is after checking if it hit the fire ball, set a boolean variable to true. ill call it "startMoving" in this example. Add an Event tick node, then do a branch to see if "startMoving" is set to true. If it is, then you can use a VInterp node with 2 get actor locations in the two vector pins. The first GetActorLocation will have Self as the target, and the second one will have the object it is moving towards as the target(you can drag out the "OtherActor" pin from The overlap event in there.) then take the result of the "VInterpTo" node and plug that into a "SetActorLocation" node. Ive never played Half Life before so i dont know if thats what you want, but i think thats what youre going for with this

more ▼

answered Jan 11 '18 at 05:41 AM

avatar image

ViceVersa
1k 64 47 98

(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