I’m a beginner who doesn’t know the head & tail of setting up a script that can get the cylinder standing in as my 3d protagonist to move forward, backward, left right and rotate so she can turn around and look forward.
It’s a survival horror game in the style of outlast so she’s gotta look everywhere.
I have no idea how to begin a script or how to assign the values and functions correctly. I have so many reds in my console.
That sounds like a cool project but perhaps take a break from it and check out some of the basic tutorials if you are just getting started. I would recommend the pathways as a great place to start if you are just getting started with Unity. There is also a path for specifically for programming if its scripting which is giving you the most challenges:
It happens that I’m working on a player Controller Script so this might be helpful, you can move, jump and sprint( if you release sprint key it regenerates )
Setup: PlayerMovement
Create a new Script on your Player , call it PlayerMovement to match the script name , open it and paste this script below , i would suggest you try and learn from it
save and return to Unity , when done compiling all you need to do is create a GameObject under your player called groundCheck and position it near the bottom of the player if your player is a silinder vir 1:1:1 dimensions set the Transform to (0, -0.9, 0).
Now lastly you need to create a new LayerMask for the ground, In the top right of the inspector you’ll see Layer : Default" click on it and Add a new layer called Ground.
On your Player script there is a field called GroundMask change it to the newly created "Ground" layer, Also select all your Ground GameObjects which you want to be able to jump on and set their Layer to ground.
It should work now , for more info watch the Brackeys youtube video on youtube about settings up fpsMovement, which this script is based on.