playcanvas / playcanvas-tween

A tween library for PlayCanvas
MIT License
59 stars 45 forks source link

Quaternion as a target tween #22

Closed LeXXik closed 2 years ago

LeXXik commented 3 years ago

Allow to provide Quaternion as a target tween.

This PR allows to provide a target rotation in both Quaternions and Euler Angles:

var targetRotation = someEntity.getLocalRotation();

entity.tween(entity.getLocalRotation())
    .rotate(targetRotation, 2, pc.QuadraticInOut)
    .start();

Fixes #

I confirm I have signed the Contributor License Agreement.

yaustar commented 2 years ago

Long time coming but it looks good to me