-
How to get a generic filter to work?
Here's the rundown of what I'm trying to do:
-I want an object to approach the rider and then stop right before hitting him. (The rider will be stationary but might be in slightly varying positions, so I want the object to get within 1 meter of the rider before stopping)
-I have an object position event moving the object towards the rider
-I have a distance operator and set it to track the distance between the rider and the object. The distance is measured by the driving line. (Or a plane, it doesn't make much of a difference)
-I connected the distance operator to a generic filter. The distance operator is the first value, and I set it so that the generic filter will send an impulse when the value of the distance operator is less than 1.
-I set the generic filter to send an impulse when true. This impulse goes to a state event that turns off the object position event (as well as the curved data source and interval trigger) that is causing the object to move towards the rider.
Everything seems to be working fine but it refuses to work for some reason. The distance operator will decrease. When it gets below 1, the generic filter turns green. However, as far as I can tell an impulse is NOT sent to the state event. What the heck am I doing wrong?
-
Re: How to get a generic filter to work?
you need to set an interval trigger to send an impulse to the generic filter at all times for the filter to send out an impulse.
-
Member
Re: How to get a generic filter to work?
Can you do it the old fashioned way and have a trigger disable the physics when the object gets to the desired location of stopping?
-
Re: How to get a generic filter to work?
You're making the same mistake I did when I first started, I think it's a pretty common mistake.
Filters are just that, FILTERS. They don't send out an impulse. You need to give the filter an Impulse, and the filter then passes the impulse if the condition is met.
You could just set an interval trigger to the filter and that way it will constantly monitor the distance and turn it off.
-
Re: How to get a generic filter to work?
Thanks guys. I changed the idea anyway but that information is obviously good to know for the future.
Ajuvix, that wouldn't work because I used an object position event to move the object. The physics on that object were never on in the first place.