Fix focus change

This commit is contained in:
Pascal Serrarens 2024-03-11 08:49:32 +01:00
parent 90b4c46988
commit fbfbb8cbaf

View File

@ -112,7 +112,7 @@ namespace Passer {
// This is not working, because Unity may set this to the wrong object autonomously // This is not working, because Unity may set this to the wrong object autonomously
//touchedObject = data.pointerCurrentRaycast.gameObject; //touchedObject = data.pointerCurrentRaycast.gameObject;
//if (touchedObject == null) {// object is a 3D object, as we do not use Physicsraycaster, use the focusObject //if (touchedObject == null) {// object is a 3D object, as we do not use Physicsraycaster, use the focusObject
touchedObject = focusObject; touchedObject = focusObject;
//} //}
DebugLog("Touch " + touchedObject); DebugLog("Touch " + touchedObject);
@ -121,8 +121,10 @@ namespace Passer {
focusing = true; focusing = true;
return; return;
} }
else
ProcessFocus();
if (!clicking) { // first activation if (!clicking) { // first activation
touchedObject = data.pointerCurrentRaycast.gameObject; touchedObject = data.pointerCurrentRaycast.gameObject;
if (touchedObject == null) // object is a 3D object, as we do not use Physicsraycaster, use the focusObject if (touchedObject == null) // object is a 3D object, as we do not use Physicsraycaster, use the focusObject