player controlled rolling ball

Hello I want to make a ball that is controlled by a player that rolls
It should look something like this: Marble Blast Gameplay #1 - YouTube
Could you also give me some code that i could use?


I can’t give you any specific code, but I’ll outline a solution for you.

You can easily use rigidbody.AddForce to add a really small impulse in the correct direction for every tick during which the key is pressed. (So all the code goes in Update().)

This will require that you get the current camera angle and use it as “forward”, then make the force vector depend on what combination of keys is pressed. So pressing W/forward would add impulse in the forward direction, pressing D/right would add impulse in the forward + 90 degrees direction, etc.

All you really need to do is look up some force examples, camera properties, and vectors, then put it all together.