Demigiant Forum
Unity Assets => DOTween & DOTween Pro => Topic started by: BitBash on August 11, 2015, 08:50:17 PM
-
Hi,
DOTween is rocking my world, it's been brilliant so far, however, I have hit an issue.
For some reason when using DOLocalRotate, rotation stops at 90 on the X axis. It happens with all rotation modes. Here is the code I am using to generate the rotation value:
if (modifyEnabled == true && modifyRotationEnabled == true)
{
calculatedEularRotation = modifyTarget.localEulerAngles;
if(modifyRotationX == true)
{
calculatedEularRotation.x = destination.x;
}
if(modifyRotationY == true)
{
calculatedEularRotation.y = destination.y;
}
if(modifyRotationZ == true)
{
calculatedEularRotation.z = destination.z;
}
rotationTween = modifyTarget.DOLocalRotate(calculatedEularRotation, modifyRotationSpeed, rotateMode);
}
Any ideas as to what I am doing wrong.
Thanks!
-
Hi,
Are you sure you're setting the final rotation correctly? I checked, but here everything works correctly. Also, note that you might see the X rotation differently in the Inspector (because it's a conversion from Quaternion to Vector3, so sometimes the correct value is achieved by tweening other axes): what counts is if the object truly rotates visually.
Cheers,
Daniele
-
Hi Daniele,
The actual rotation gets stuck and jitters. I think you are right and that it is nothing to do with DOTween. I'll go and have another look.
Thanks for the reply!