Issue with 2d physics colliders, any ideas?

Here is the setup…

Game object with BoxCollider2d as a trigger, no rigid body

Game object with Circle Collider 2d and a rigid body, script attached with code:

	void OnTriggerEnter2D(Collider2D col) {
		Debug.Log ("OnTriggerEnter2D");
	}

1628578--100145--$Bnrtd7YIYAEPCJo.png

the script attached to the circle collider lets me drag the attached gameobject by : myTransform.position = newPos;

however this is saying it has hit…

Anyone have any thoughts? (using unity 4.3.4)

[edit]
Just to say no scale or rotation applied to either object.

Seems to trigger when you move the collider with rigid body above the box, but not the sides or bottom.

Here is a video…

Thanks

Hi Chris, this is super weird, drop me a mail on will @ unity 3d and I’ll try it in 4.5 to see if we get same behaviour, this should signal if its a bug…

Will

thanks will, email sent

Chris, replied direct to your mail but for everyone else seeing any weirdness like this - Chris simply had some errors in his collision code, using Collider2D instead of Collision2D as his parameter in 2D OnCollision… functions. This is one of those reminders to always check the console! it should always tell you which parameter is required - if you spot script errors that aren’t being reported accurately, please email us on support at unity3d dot com of course.

Just to update the email discussion here.

Yep there was an error in my onCollision code, but thats not the cause of this issue.

See this video

If you drag a rigid body around with the mouse, it is causing it to collide with the object beneath it based on the gravity scale, the higher the scale the further away you can trigger it from the box.

So in theory when moving the circle around with the mouse I should set isKinematic on the rigidbody, but then collisions don’t work then for 2d

A temporary work around might be to set the gravity scale to zero, so then the hit won’t happen when you are above the box

Yeah, forceless non-kinematic rigidbody trigger colliders have had to become a significant part of my project.