How can you make object spin instead of rotate?
Rigidbody.AddTorque()???
Rotate and spin is the same thing. If it isn't rotating on th right pivoit point, you may need to edit the model on a 3d modeling applications.
Create an animation for the objects that need to spin.
Attach this Javascript to whatever you want to spin. Change the variables in the inspector so that it spins on only one axes and not all 3. the bigger the number, the faster it spins. if it is set to zero, it does not spin on that axes:
var xSpeed : float = 1;
var ySpeed : float = 1;
var zSpeed : float = 1;
var manual : boolean = false;
function Update ()
{
if( !manual )
{
transform.RotateAround( transform.position, Vector3.right, ySpeed * Time.deltaTime );
transform.RotateAround( transform.position, Vector3.up, xSpeed * Time.deltaTime );
transform.RotateAround( transform.position, Vector3.forward, zSpeed * Time.deltaTime );
}
else
{
if( Input.GetAxis("Horizontal") != 0 )
{
transform.RotateAround( transform.position, Vector3.up, Input.GetAxis("Horizontal")*xSpeed * Time.deltaTime );
}
if( Input.GetAxis("Vertical") != 0 )
{
transform.RotateAround( transform.position, Vector3.right, Input.GetAxis("Vertical")*ySpeed * Time.deltaTime );
}
}
}
Wow i said not rotate!!!!!!!!!!!!!!!!!!!!!!!!!!