Search Unity

OnMouseDrag Collision Detection

Discussion in 'Physics' started by Ranbe, Jan 25, 2016.

  1. Ranbe

    Ranbe

    Joined:
    Jan 25, 2016
    Posts:
    13
    Hello,
    i have those two functions:
    http://pastebin.com/XJhR4SEd
    who allows me to drag my object through the x axis
    but i have one problem , i want the object to be stopped when colliding with another object/stop when it about to be outside the camera(the camera position is constant)
    i can't figure out how to do it , appreciate any help ty :)