Reference the picture for easier understanding of the case.
.
I'm making a 3D game and want to be able to move the board up and rotate it on the Z axis using a single finger. If the finger is slid up - the board goes up. If the finger is slid left or right, the board tilts left or right.
The whole point is so that the board brings the ball that sits on top of it upwards, and when the board is tilted/rotated to the side, the ball starts sliding and falling off to the side.
The board and the ball have rigidbodies attached.
What I've tried so far:
- Using a slider that, when the value is changed the board rotates with Quaternion.Euler.
- Using the IDragHandler interface and changing the board position to the EventData received when a touch is registered.
- Tried it with buttons that modify the board position vertically by some distance - it happens instantaneously and the ball falls through the board.
- Created a UI image/joystick and used touch/event data (from IDragHandler) to move the board transform whenever the UI joystick is moved.
I've tried some more variants, unfortunately I can't recall them right now and none of what I have already tried works.