Hi, i am new to unity. can anyone tell me how to make a ball roll over a platform according to the slope of the platform with some speed. i applied the physic material and rigidbody but the ball falls very slow on the platform and rolls very slowly.
You need to adjust the balls mass and play with the friction.
http://unity3d.com/support/documentation/Manual/Physics.html
Besides what MakerOfGames pointed out, consider your scale. There’s a warning about choosing too large a scale and the resulting apparent slow motion at the top of Unity’s physics documentation.
Thanks for the information. I tried that way but i am still not getting the desired effect. What i want to do is,
- Roll a ball with some speed on a plane.
- Control the ball’s direction by changing the direction of the slope of the plane.
Do i have to use scripting for that. If yes then pls tell me how to go about doing that.
Again, consider your scale as explained at the top of the Unity’s physics documentation.
I achieved this in a couple minutes with zero scripting by simply playing with friction and the plane’s angle. Unity’s built-in physics engine does the rest. Now, if you want to modify the angle of the plane on the fly, for that you may need to write some code.
Thanks Ostagar for taking the trouble of making the video for me. I got the desired effect i wanted. Though what i did was change the gravity to something -200 in physics settings of the project settings. Is this ok or a wrong way to do? I created a sphere and changed its scale value to 75. Is this also wrong? Thanks again for the quick replies.
Razor, if that’s all you need your program to do, and it’s working now, then it’s probably fine.
But realize what you’ve done–you’re created a sphere larger than my house and set the gravity to be similar to Jupiter’s… If you plan to extend this program by adding more physics-controlled objects or more objects that act on your sphere, it’s worth correcting the physics early on.
Thanks Ostagar for the last comment:smile:. That was an excellent way to put it. I pictured what u wanted to say and followed u r advice. Now everything is working great, i set gravity to default. Earlier what i had done was that i had created the plane and the sphere in the default unity viewport setting because of which i had scaled the objects as i could not see them. As soon as i read u r example, i realized my mistake. Thanks.