1
DOTween & DOTween Pro / Block child gameobject rotation
« on: March 13, 2016, 11:32:41 PM »
Hi,
Trying to rotate a null(earth globe) gameobject with child gameobject(country), but child rotate separatly and null don't rotate.
http://screencast.com/t/3jjhFuyB5FHn
Here is code used :
m_Rigidbody.transform is the null gameobject.
I have also tried some other method with or without rigibody... without success. How can I fix this ?
Thanks
Trying to rotate a null(earth globe) gameobject with child gameobject(country), but child rotate separatly and null don't rotate.
http://screencast.com/t/3jjhFuyB5FHn
Here is code used :
m_Rigidbody.transform is the null gameobject.
Code: [Select]
switch (gameObject.name)
{
case "Left":
m_Rigidbody.transform.DOLocalRotate(-Vector3.up * m_Torque, 2, RotateMode.LocalAxisAdd);
break;
case "Right":
m_Rigidbody.transform.DOLocalRotate(Vector3.up * m_Torque, 2, RotateMode.LocalAxisAdd);
break;
default:
break;
}
I have also tried some other method with or without rigibody... without success. How can I fix this ?
Thanks