So following some advice on the forums, I’ve successfully made a 2D pong game and am now trying a 3D version of it.
There’s the game I’m trying to get the “physics” of.
Now it seems pretty straight forward, but here’s the issues I’m having:
-
Getting the paddle to stay in the same position relative to the mouse. Currently I’m using…
void Update () { Vector2 mousePosition = new Vector2 (Input.mousePosition.x, Input.mousePosition.y); myTransform.position = mousePosition; }
but that is giving me a really weird and undesired effect where the paddle stays still and the rest of the world moves around it.
The next part I’m having trouble with is figuring out how to put spin on the ball itself based on the paddle’s movement.
I have no idea how to go about doing this, but I would assume it’s possible with the standard Rigidbody functions?
Any links, code, snippets greatly appreciated!