easy to make the ball rolling in realistic way, I used this code:
var speed = 10.0;
var gravitypull = 0;
function FixedUpdate() {
rigidbody.AddForce (Vector3(0, gravitypull, 0));
var cameraTransform = Camera.main.transform;
// Forward vector relative to the camera along the x-z plane
var forward = cameraTransform.TransformDirection(Vector3.forward);
forward.y = 0;
forward = forward.normalized;
// Right vector relative to the camera
// Always orthogonal to the forward vector
var right = Vector3(forward.z, 0, -forward.x);
rigidbody.AddForce(-forward * speed * Time.deltaTime);
}
Then, I tried to let this ball roll rotation toward another game object, I used " transform.LookAt(target); " but it damage the realistic rolling which I made before, it let the ball crawl …!
my question:
how can let my ball roll in realistic way but toward a game object?
regards
iammfa