Question How to access whether collision trigger is active

el_gallo

Member
Messages
28
Reactions
2
Points
8
I'm developing a new VaM plugin. I've created TriggerActionDiscrete handlers for trigger start actions. However, I have noticed that what I really need for my plugin is either a handler or some way to access whether a trigger is active in my plugin's Update function. I know VaM is tracking it somehow to show these green and red values in the picture. They presumably map to some bool or handler in the trigger's classes but I haven't found it yet.

Can anyone tell me where in the code I can access this bool value and/or create a handling action for it?

Green trigger.jpg
 
Okay. Cobbled this together from the vamX plugin's code and it seems to work in my Update function:

C#:
Rigidbody rigid = containingAtom.rigidbodies.First(rb => rb.name == "lNippleTrigger");
Dictionary<Collider, bool> d = rigid.GetComponent<CollisionTriggerEventHandler>().collidingWithDictionary;
if (d.Count > 0)
{
    SuperController.LogMessage($"LNipple ACTIVE");
}

Please let me know if there is a more efficient method.
 
Upvote 0
Back
Top Bottom