So i have an widget that is about 466 in height as the widget indicates and it is anchored to the bottom, so this to me would indicate it is 466 pixels up the screen yes?
I am then getting the mouse position and finding out how far from the top of the widget it is...wether it is under the height of 466 or more. However the "UICamera.currentTouch.pos" code seems to return a position that is affected by screen scaling where as the height im currently getting from the UIWidget is not...soIi have to scale one or the other by something, and i am not certain what. I have tried "UIRoot.GetPixelSizeAdjustment" but that scaling value is still a bit off it seems. here is my current code.
void CalculateDisplacementFromCrossOver ()
{
cardHandWidget = objectToBeginScrollingFrom.GetComponent<UIWidget>();
var docksMaxY = cardHandWidget.localSize.y;
var touchPointInStandardScreenSpace = UICamera.currentTouch.pos.y;//in pixels
displacementFromCrossover = touchPointInStandardScreenSpace - docksMaxY;
Debug.Log("pixel size adjustment:"+UIRoot.GetPixelSizeAdjustment(cardHandWidget.gameObject));
Debug.Log("touch Height:"+touchPointInStandardScreenSpace);
}