V2 ContactEventsDemo Question
V2 ContactEventsDemo Question
I do know OnContactAdded in ContactEventsDemo, but any simple guide for OnTouching and OnContactRemoved?
Re: V2 ContactEventsDemo Question
Not at the moment- the ContactEventsDemo was intended to be it, I just didn't want to make it extremely long. The idea for OnContactRemoved is similar to OnContactAdded; when a contact that was previously seen is no longer there, invoke a callback. OnTouching is simpler because it doesn't require tracking previous state.
My personal recommendation is to avoid 'transition' events OnContactAdded/Removed if possible because they add nontrivial complexity. You can almost always get away with current-state-only analysis with a little logical refactoring.
My personal recommendation is to avoid 'transition' events OnContactAdded/Removed if possible because they add nontrivial complexity. You can almost always get away with current-state-only analysis with a little logical refactoring.