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.

Thanks

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.

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.

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.

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

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

Glad to hear.