Hi,
Here is a adaptation of SetIsKinematic action to control isTrigger for a collider ( after Marcos's request).
// (c) Copyright HutongGames, LLC 2010-2011. All rights reserved.
using UnityEngine;
namespace HutongGames.PlayMaker.Actions
{
[ActionCategory(ActionCategory.Physics)]
[Tooltip("Controls a collider isTrigger Flag")]
public class SetIsTrigger : FsmStateAction
{
[RequiredField]
[CheckForComponent(typeof(Collider))]
public FsmOwnerDefault gameObject;
[RequiredField]
public FsmBool isTrigger;
public override void Reset()
{
gameObject = null;
isTrigger = false;
}
public override void OnEnter()
{
DoSetIsTrigger();
Finish();
}
void DoSetIsTrigger()
{
GameObject go = Fsm.GetOwnerDefaultTarget(gameObject);
if (go == null) return;
if (go.collider == null) return;
go.collider.isTrigger = isTrigger.Value;
}
}
}
Bye,
Jean