/*--------------------------------------------------------------------------------------------*/ public Vector3 GetPointNearestToCursor(Vector3 pCursorLocalPos) { if (vNavSlider.AllowJump) { return(vHiddenSlice.GetPointNearestToCursor(pCursorLocalPos)); } Transform objTx = gameObject.transform; Transform grabTx = vGrab.gameObject.transform; Vector3 cursorWorld = objTx.TransformPoint(pCursorLocalPos); Vector3 cursorGrab = grabTx.InverseTransformPoint(cursorWorld); Vector3 nearestGrab = vGrab.GetPointNearestToCursor(cursorGrab); Vector3 nearestWorld = grabTx.TransformPoint(nearestGrab); return(objTx.InverseTransformPoint(nearestWorld)); }
/*--------------------------------------------------------------------------------------------*/ public Vector3 GetPointNearestToCursor(Vector3 pCursorLocalPos) { return(vSlice.GetPointNearestToCursor(pCursorLocalPos)); }