Im trying to make a rolling ball game where the camera follows the ball and when you look left or right so does the ball. The only problem is that i can’t figure out how to do this.
I think the best way to do this is to change the code i have below so that the ball rolls to its forward. then when you press right it rolls to its right, not just the games X,Y,Z.
I am a complete noob to scripting so if you offer a script give the whole thing, not a scrap cuz i will have no idea where to put it.
The ball NEEDS to roll.
The first person that gives me a answer gets his name in the credits for scripting help
I had this exact problem, this was my fix:
Use 3rd person character controller scripts default with unity, they should be under Standard Assets.
If you do not have the scripts, go to Assets->Import Package->CharacterController
Attach the Character Controller Script to the Ball, and Attach a 3rd Person Camera Controller too.
The ball will not roll, but you will just have to import an fbx file that has animations of rolling on the axis that you want. Attach a Mouse Look Script as well if you want the camera movement on certain axis.
Here is my github showing my game using this: GitHub - SinnDevelopment/BinaryBall: 2D/3D Unity Adventure Game