Detect motion?
Quote from Vandread83 on May 27, 2011, 2:40 pmIs there a way to detect motion of a func_physbox? or something I can put around the physbox that triggers when motion inside this field ceases or begins?
So if someone nudges the box it triggers an event and as soon as the box settles and stops moving it triggers a 2nd event. If someone pushes it off a cliff then it'll trigger on motion while its being pushed and falling, but triggers the stop when it hits the bottom and comes to lay still.
I know with func_physbox I can trigger on pickup and motion to catch picking it up and pushing it, but I really need a way to tell when its stopped moving since different scenarios could result in different amounts of time for it to stop moving I don't want to have to use a timer if at all possible.
Is there a way to detect motion of a func_physbox? or something I can put around the physbox that triggers when motion inside this field ceases or begins?
So if someone nudges the box it triggers an event and as soon as the box settles and stops moving it triggers a 2nd event. If someone pushes it off a cliff then it'll trigger on motion while its being pushed and falling, but triggers the stop when it hits the bottom and comes to lay still.
I know with func_physbox I can trigger on pickup and motion to catch picking it up and pushing it, but I really need a way to tell when its stopped moving since different scenarios could result in different amounts of time for it to stop moving I don't want to have to use a timer if at all possible.
Quote from CraigChrist on May 27, 2011, 4:25 pmfunc_physbox has an output OnAwakened. That should trigger when it starts to move...
I don't see the one for when it stops on the VDC, I'll check later in hammer.
func_physbox has an output OnAwakened. That should trigger when it starts to move...
I don't see the one for when it stops on the VDC, I'll check later in hammer.
Quote from Vandread83 on May 27, 2011, 10:53 pmNot sure what OnAwakened actually does, but when I push on the box and shove it around I know its not triggering it.
Not sure what OnAwakened actually does, but when I push on the box and shove it around I know its not triggering it.
Quote from King Of Sandvich on May 28, 2011, 12:47 pmYeah... Sleeping/waking up doesn't seem to work right for physboxes.
Any why has Valve never added an OnSleep output for physics objects???
Yeah... Sleeping/waking up doesn't seem to work right for physboxes.
Any why has Valve never added an OnSleep output for physics objects???
