- Home /
Question by
OzymandiasCo · Sep 24, 2014 at 08:46 AM ·
gameobjectmousedrag
Getting what gameobject another gameobject was mousedragged to
I am trying to get my script to determine which object the gameobject I am dragging is dragged on top of. So I drag gameobject A onto gameobject B, how would I go about determining that it was gameobject B that gameobject A was dragged onto?
Comment
Best Answer
Answer by 767_2 · Sep 24, 2014 at 08:59 AM
if your gamebjectA got colliders you can do this add a tag
void OnCollisionEnter (Collision col)
{
if(col.gameObject.tag == "gameObjectB")
{
//...
}
}