Possible alternate solution?

I didn’t wait for the challenge to finish, and instead of using button images I used a scrollbar to set the position (could’ve also used a slider).

It doesn’t conflict with swipe gestures, and because it (and the slider) have the “On Value Changed” events, the method signature “MoveStart (float xNudge)” allows Unity to Dynamically pass the new value to the method - from there, I can use:

((0.5f - xNudge) * 105) 

to set the ball’s x position anywhere along the width of the floor.
This comes with the added benefit of “auto-clamping” the ball’s x position - consequently, my “MoveStart” method is:

public void MoveStart(float xNudge){
	if (!ball.Rolling) {
		ball.transform.position = new Vector3 ((xNudge - 0.5f) * 105, ball.transform.position.y, ball.transform.position.z);
	}
}

The 105 is actually a little sloppy - I could / should use:

  • [Floor GameObject].transform.localScale.x, OR
  • [Floor GameObject].transform.lossyScale.x

to grab the the width of the floor.

What do you guys think? Is there a lesson here I may be missing (besides Event Triggers)? Or am I just circumventing a lot of extra work?