Quick question about the blockbreaker Udemy tutorial. I’m at section 5, episode 74 (The Complete Unity Developer), where you have to create a C♯ Script for the Paddle.
I just entered the code to make the paddle move with the mouse. It works, it does move with my mouse, but the paddle is way more to the right than my mouse.
I tried to enter position X 8.0110, Y 0.5 for the paddle object (like shown in the tutorial), but it makes the paddle appear outside my game screen (although in the tutorial it gets positioned at the center). My guess is I messed up the coordinates of the background maybe ? The C♯ Code I entered is correct, so it must be something in the Unity settings.
If somebody knows why my paddle is off, please share Otherwise I’m afraid I have to begin the tutorial from the beginning to make sure I didn’t miss a step somewhere.
Could you stop the game running, click on the Background GameObject in the Hierarchy and with the Inspector visible, post up another screenshot please.
Did you move the pivot point to the bottom left hand corner of the background? I notice that you have Center selected at the top. Based roughly on your first screenshot I would suggest you are approximately 8 world units out, which would be half of the playspace.
The left hand side of the playspace should be -8 on X and the right hand side should be 8 on X. (Lecture 68 @ 03:37)
So I checked, playspace is in fact at -8 X on the left and 8 X for the right side. So that is correct.
I changed ‘Center’ to ‘Pivot’ at the top.
Having the background object selected, it shows me the pivot being in the center of the image. (image attached) However, if I try to click and drag it to the bottom left corner, it drags the whole background image with it. I see in the tutorial that it’s possible to drag the pivot independently to the bottom left corner. Any idea what I’m doing wrong ?
Thanks again
(and if we don’t find the solution I’ll restart the tutorial from beginning, no biggie)