Obi Official Forum

Full Version: Collision marked as Trigger not collides
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Obi Plugin v.3.5, Unity 2017.4.5f1 LTS
Collision marked as Trigger does not collide with cloth during simulation.
I've added a temporal fix in Oci.cs in two Set functions, see coding example below.

Is there a reason for it and can I turned simulation on also for trigger objects? Thanks.

ps. Also turning on/off isTrugger not makes collider dirty for Obi, so you need to disable and re-enable it for making them counted by Solver. 

Code:
        public void Set(UnityEngine.Collider source, int phase, float thickness){
            boundsMin = source.bounds.min - Vector3.one*(thickness + source.contactOffset);
            boundsMax = source.bounds.max + Vector3.one*(thickness + source.contactOffset);
            translation = source.transform.position;
            rotation = source.transform.rotation;
            scale = source.transform.lossyScale;
            contactOffset = thickness;
            this.collisionGroup = phase;

           //for some reason trigger colliders are not taking part in the simulation
           this.trigger = false;// source.isTrigger;
            this.id = source.GetInstanceID();
        }
(16-08-2018, 12:33 PM)mmortall Wrote: [ -> ]Obi Plugin v.3.5, Unity 2017.4.5f1 LTS
Collision marked as Trigger does not collide with cloth during simulation.
I've added a temporal fix in Oci.cs in two Set functions, see coding example below.

Is there a reason for it and can I turned simulation on also for trigger objects? Thanks.

ps. Also turning on/off isTrugger not makes collider dirty for Obi, so you need to disable and re-enable it for making them counted by Solver. 

Code:
public void Set(UnityEngine.Collider source, int phase, float thickness){
boundsMin = source.bounds.min - Vector3.one*(thickness + source.contactOffset);
boundsMax = source.bounds.max + Vector3.one*(thickness + source.contactOffset);
translation = source.transform.position;
rotation = source.transform.rotation;
scale = source.transform.lossyScale;
contactOffset = thickness;
this.collisionGroup = phase;

           //for some reason trigger colliders are not taking part in the simulation
           this.trigger = false;// source.isTrigger;
this.id = source.GetInstanceID();
}

Triggers are just that, triggers. By definition, they do not generate collisions and won't take part in the simulation at all. See:

https://unity3d.com/es/learn/tutorials/t...s-triggers

Also, excerpt from the Unity manual:

Quote:A collider configured as a Trigger (using the Is Trigger property) does not behave as a solid object and will simply allow other colliders to pass through. When a collider enters its space, a trigger will call the OnTriggerEnter function on the trigger object’s scripts.

https://docs.unity3d.com/Manual/CollidersOverview.html
(16-08-2018, 01:36 PM)josemendez Wrote: [ -> ]Triggers are just that, triggers. By definition, they do not generate collisions and won't take part in the simulation at all. See:

https://unity3d.com/es/learn/tutorials/t...s-triggers

Also, excerpt from the Unity manual:


https://docs.unity3d.com/Manual/CollidersOverview.html

Thanks for clarifying.