2D Toolkit Forum
2D Toolkit => Support => Topic started by: will_brett on February 17, 2013, 12:40:01 pm
-
Hey everyone.
I've made a simple sprite and attached a box collider from the TK2D settings. I have also made a cube in the scene removed mesh renderer, and using playmaker added a trigger events action. (this works with a first person controller)
When i drag the sprite with its collider into the trigger area nothing happens... what am i doing wrong?
Thank you
-
Do you have a rigidbody on one of the sprites? You should always have a rigidbody on any moving collider. Set it to kinematic if you just wanna move it instead of applying forces.
http://docs.unity3d.com/Documentation/ScriptReference/Collider.OnTriggerEnter.html
Also - as the docs say, OnTriggerEnter, etc. only work when one of the colliders have a rigid body.
-
Thanks, this was the issue.