Demigiant Forum
Unity Assets => DOTween & DOTween Pro => Topic started by: GenPhi on May 14, 2016, 05:39:28 PM
-
Hi,
I am having with using DoLocalMoveZ to move forward. I have a character that I rotate then move forward on the transforms local z axis but it is using world z when I move. Basically it always moves up 3 on the world z axis but I need it to move up on the transforms z axis.
Here is an example of what I have.
//swipeUp
transform.parent.DORotate (new Vector3(0,0,0), 1F);
Move();
//swipeDown
transform.parent.DORotate (new Vector3(0,180,0), 1F);
Move();
private void Move()
{
transform.parent.DOLocalMoveZ(transform.parent.position.z + 3, 1f);
}
-
I see this hasn't been answered.
I have the same problem, did you find out the problem, or does anyone else know?
Basically I would it to tween a transform using the 'Space.Self'.
-
For future reference, if anyone get the same problem.
From what I understand is that DOTween doesn't support moving with space.self at this moment. (maybe in the future).
It was suggested that you put the object in a parent and rotate the parent, then move the child object inside the parent. It might for some cases!