Topic was automatically imported from the old Question2Answer platform.
Asked By
bingbong
So a newb to Godot, and im working through the docs, (made sure im on the 3.1 docs) but have got as far as the point where the eyeball character should move around the screen, but hes stuck in the top left corner (his legs wiggle with the up/down/left/right keys pressed tho) and wont actually move…
Im using linux version, but have gone through tutorial again on windows with the identical result. Even started from scratch again with the same prob. Double and trebble checked the scripting bit isnt mis typed… Copy pasted the script to make sure again but still nothing
arnt clear (for beginning beginners!) what the indentation should be, noted the mistake and it works, thanks!
In theory should it work without these 3 lines?
This bit just stops it moving off the screen and getting lost, no? (so it implies) Without these lines the guy just sits there wiggling his feet!
bingbong | 2019-05-28 23:38
Well, the first line actually moves the player. The two clamp() lines stop it from moving off the screen.
I had this problem and it turned out my godot script wasn’t connected to the player. I dragged the script over to the script section on the inspector under player node to attach it to the Player.