actuate
actuate copied to clipboard
smartRotation when using Actuate.update doesn't have an effect
I'm using Actuate with Heaps engine. What I'm trying to do is to rotate a battletank Object from 0 degrees to 345 degrees.
Actuate.tween(tank, 2, { rotation: 345 }).smartRotation();
The above code has no effect, and I think that's because how actuate manipulates objects. Thankfully, Actuate has a function tween which I can use to call Heaps' setRotation method.
Actuate.update(tank.setRotation, 2, [0, 0, degToRad(0)], [0, 0, degToRad(345)]).smartRotation();
The tank rotates, but it takes the long way-- clockwise. The shorter path from 0 to 345 would be counterclockwise.
This is just a wishlist. I wish smartRotation() would be effective when using with Actuate.update()