WASDEQ - Move Arrow Keys - Look
I have finally decided to share this project... If you want to use this, please credit me (I recommend you credit @KryptoScratcher instead, its my main account). There are instructions inside the project. Huge thanks to @SpinningCube for rendering the costumes for me in blender How it works is it gets the angle between the light vector and the vector from the sphere pointing towards the camera. Using this direction, we can divide it to fit in the range of the costumes (1-25). We then have the costume, but we still need to point it towards the light. To do this we need to project the 3d light to 2d, and then use atan2. An issue occurs if the light is behind the camera, so we rotate by 180 if the projected light y is less than the projected sphere y and the light is behind the camera, or they both are false. About a month ago, me and @SpinningCube had a conversation about having realtime smooth shaded spheres on scratch. At first I thought of doing a similar method to how @chrome_cat did it but during that conversation, SpinningCube gave me a link of how @piano_miles did a similar thing with costumes. This project uses a very similar way piano_miles did, but its a lot more efficient.