Increased Fall Speed

I’m using the DragRigidBody script that comes with unity.

var spring = 50.0;
var damper = 5.0;
var drag = 10.0;
var angularDrag = 5.0;
var distance = 0.2;
var attachToCenterOfMass = false;

private var springJoint : SpringJoint;

function Update ()
{
	// Make sure the user pressed the mouse down
	if (!Input.GetMouseButtonDown (0))
		return;

	var mainCamera = FindCamera();
		
	// We need to actually hit an object
	var hit : RaycastHit;
	if (!Physics.Raycast(mainCamera.ScreenPointToRay(Input.mousePosition),  hit, 100))
		return;
	// We need to hit a rigidbody that is not kinematic
	if (!hit.rigidbody || hit.rigidbody.isKinematic)
		return;
	
	if (!springJoint)
	{
		var go = new GameObject("Rigidbody dragger");
		var body : Rigidbody = go.AddComponent ("Rigidbody") as Rigidbody;
		springJoint = go.AddComponent ("SpringJoint");
		body.isKinematic = true;
	}
	
	springJoint.transform.position = hit.point;
	if (attachToCenterOfMass)
	{
		var anchor = transform.TransformDirection(hit.rigidbody.centerOfMass) + hit.rigidbody.transform.position;
		anchor = springJoint.transform.InverseTransformPoint(anchor);
		springJoint.anchor = anchor;
	}
	else
	{
		springJoint.anchor = Vector3.zero;
	}
	
	springJoint.spring = spring;
	springJoint.damper = damper;
	springJoint.maxDistance = distance;
	springJoint.connectedBody = hit.rigidbody;
	
	StartCoroutine ("DragObject", hit.distance);
}

function DragObject (distance : float)
{
	var oldDrag = springJoint.connectedBody.drag;
	var oldAngularDrag = springJoint.connectedBody.angularDrag;
	springJoint.connectedBody.drag = drag;
	springJoint.connectedBody.angularDrag = angularDrag;
	var mainCamera = FindCamera();
	while (Input.GetMouseButton (0))
	{
		var ray = mainCamera.ScreenPointToRay (Input.mousePosition);
		springJoint.transform.position = ray.GetPoint(distance);
		yield;
	}
	if (springJoint.connectedBody)
	{
		springJoint.connectedBody.drag = oldDrag;
		springJoint.connectedBody.angularDrag = oldAngularDrag;
		springJoint.connectedBody = null;
	}
}

function FindCamera ()
{
	if (camera)
		return camera;
	else
		return Camera.main;
}

when I release the object it falls slowly to the ground, I want to make it fall faster. I also want to add a pickup distance, something like var pickupdistance, I just don’t know how to script any of this… can anyone help please?

I solved my distance problem
I changed if (!Physics.Raycast(mainCamera.ScreenPointToRay(Input.mousePosition), hit, 100))
to if (!Physics.Raycast(mainCamera.ScreenPointToRay(Input.mousePosition), hit, 3))
and it works, I still however, need to solve the falling speed problem, can anyone help?

Things don’t just fall on their own in Unity. A force has to be applied to them. You need to muck with the constant gravity acting upon your rigidbodies.

Does anyone know a way I can add increased fall speed to the objects via the script above?

It’s a springjoint. I suggest you look up the properties you are currently using. Within the object. If I might ask, did you take the code above from a tutorial? If so, I’d suggest re-reading it. You might kick yourself when you figure out the answer.

I’ll give you a clue: spring

It probably is related to the type of object you’re using here, haven’t done much with the wackier physics stuff in Unity, but this type of problem in engines can also be related to the scale of either the falling object or the world around it. Falling objects in a physics-driven engine are going to fall at the correct speed, unless there’s some kind of force being applied such as drag. They’ll look slow if your environment is not to a “realistic” scale.