4DIS - Character Controllers

From Unify Community Wiki
Jump to: navigation, search

Character Controllers


Roll a ball :

<javascript>

@script RequireComponent ( Rigidbody )

public var speed : float = 5.0; public var force : float = 7.5;

private var motion : Vector3 = new Vector3 ( 0, 0, 0 );

function Update ( ) {


   rigidbody.velocity = Vector3.Lerp ( rigidbody.velocity, motion, Time.deltaTime * force );

}

</javascript>

Personal tools
Namespaces

Variants
Actions
Navigation
Extras
Toolbox