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 am running an animation and need to know when something is at a location to do something

I have an animation running and I want to keep track of an object that is moving so it does something when it hits a certain point. I don't want to use a trigger since it fires when I don't want it to. I would love to disable triggers but I haven't found a way yet.

So 2 questions...can you disable triggers so they don't fire when you don't want them to? How do you keep track of an actor's location so it does something when it hits a certain point, without triggers.


Product Version: UE 4.18
more ▼

asked Mar 19 '18 at 08:39 PM in Blueprint Scripting

avatar image

11 1 2

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

1 answer: sort voted first

In principle what you are trying to do is to get an actors location every frame and when it matches your desired location, then fire some logic.

alt text

I would not suggest doing it this way, this is just an example to show you how to compare two locations against each other. If your object is game critical and very fast moving you might be able to justify using tick, but again I wouldn't recommend it.

If the location does not need to be updated on every single frame, because it's either fairly slow moving or it does not need to be pinpoint accurate, then you could use a timer quite safely to run the same check at a slower rate. This also has the benefit of being able to be turned off when not needed.

As far as the triggers, I'm going out on a limb here and assume you are talking about an overlap or hit event? There's a couple of checks you can make if the event is firing from a hit/overlap of an object you do not want it to.

The problem probably lies in the collision profiles that it's checking against, you could set these so that the object only collides with the specific profile of the object you are checking against by making a custom profile in Project Settings-> Collision-> New Object Channel, and then setting that overlap to only check against that profile.

alt text

The other way, if you don't want to worry about changing collisions is you can just put a cast gate after the hit/overlap event and only if the other actor is of that class will it react.

alt text

Hopefully there is some useful information somewhere in this post and you are able to proceed with what you are trying to accomplish.

locationcheck.png (153.3 kB)
hitgate.png (83.5 kB)
more ▼

answered Mar 20 '18 at 02:50 AM

avatar image

Ruffhaus Games
663 13 9 23

avatar image Aeaden Mar 20 '18 at 03:47 AM

Thanks, this really does help. I did use an object channel to limit a trigger and it did work. I appreciate the answer :)

avatar image Ruffhaus Games Mar 20 '18 at 05:51 AM

Glad to hear.

(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