For my Prototype I decided that I was going to attempt to remake the game "Katamari Damacy" or at least remake the rolling mechanic that makes the game what it is. To do this I found and followed a tutorial I found on youtube that I will link at the bottom of this post.
I started by making a simple plane and duplicating it so that the player had enough area to roll in, I then made a material and called it "checker" and assigned it the default checker pattern you can find in unity and put the material onto the planes. Now it was time to get the game started or should I say it was time to get the ball rolling.
The code to make the ball roll before I changed the bottom line so that the ball would get faster as it grew and be able to roll easier.
The code after I changed it.
For the prototype I didnt just want the ball to move, but I wanted to make the ball feel like it was rolling. To do this I made it so the ball gets faster as it moves, this means that if you were to want to change direction it wouldn't just immediately change direction but would take awhile due to the momentum.
After I made the ball able to roll I did the code to make the ball able to pick up objects as it rolls,  I did this by using oncollisionenter and making it so that if the objects have the tag "prop" then they will be parented by the ball. Before I did this I made it so that the ball controls are synoymous with the direction of the camera (forward on the controls will be forward on the camera)
The code that made the ball pick up objects.
After setting cinemachine up with the camera by making a virtual camera and setting the main camera as the cinemachine brain I needed to fix how slow the ball rolled when it picked up objects, I did this by multiplying the roll speed by the size of the ball.
After doing that I had reached the end point of the tutorial video I was watching and had made the most basic form of "Katamari Damacy" that I could make in Unity.
I added some finishing touches to the camera to make it easier to see the props around you.
The floats and privates I had set.

You may also like

Back to Top