I want to make my sun in my 2d game spin/rotate and I wonder what the easiest way to do it? I figured I go to the camera and add new script? or just script? What coding language do you recommend to choose? I have small experience with boh C# and Java but can’t really decide which one.
I recommend you head over to Unity Learn first and complete at least the “2D UFO” tutorial. It should help you get started with understanding how to use Unity’s API.
Thank you so I started instead by putting in player control on my object (the player object) and when I move it forward a little it disappears do you know why’s that?
In 2D games, GameObjects will only be visible if they are in front of the game camera, meaning the the object’s Z position needs to be greater than the camera’s Z position, otherwise it will be behind the camera.
Check if your object’s Z position is increasing as it moves.
It does increase if I press the W key though I don’t really need it in a game like this, A and D would just be fine so I can move the ball left and right.