Hey, Ive been messing around in Unity these past few days with a sphere trying to get a few things right but I have absoloutly no idea =/.
My first question is I have a sphere that moves around but I can't make it look as though its "rolling" how do I do this?
My second question is can I make my ball bounce along other objects, and make it controllable whilst bouncing?
And my third is I have a flat plane made from a cube and a curved plane next to it, when I move onto the curved I can't go agaisnt the force and move up the cube my sphere only falls down, I've tryed messing with gravity but that doesn't change anything.
If your intent is to make the ball physics-enabled only, it's easy to make your ball roll by applying some higher friction to the physics material that is attached to the rigidbody (I believe dynamic friction will help you most with it, but try increasing both static and dynamic; if either one is too low, you'll get a ball that keeps wanting to slide, and unless your ball is made of ice, it typically doesn't happen).
Friction is the answer to the second part of your problem as well. Increase the friction of the physics material and you should have less of a problem climbing that hill.
Once you increase the friction though so that the ball is behaving realistically, you may want to start using applyTorque to spin the ball instead of applyForce to push the ball around. This will drastically enhance how realistically it rolls about, because as you probably know, this is similar to how a wheel on a car operates. It doesn't mobilize by being pushed by an external force, it mobilizes by spinning.
Hope this helps. I made a physics-based ball rolling 3D platformer in Unity so I know a lot about this subject. :)
answered Jan 03, 2011 at 03:18 AM
Also, for future references, you should separate all questions in their own... This keeps it neat, and you get more answers (For example, I don't know the answer to 2... But someone else might, but they don't want to just answer one question, if that makes sense =) ).
Have a good one and good luck!
answered Jan 02, 2011 at 09:32 PM