Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

smartRotation when using Actuate.update doesn't have an effect #112

Open
insanity54 opened this issue Dec 18, 2020 · 0 comments
Open

smartRotation when using Actuate.update doesn't have an effect #112

insanity54 opened this issue Dec 18, 2020 · 0 comments

Comments

@insanity54
Copy link

insanity54 commented Dec 18, 2020

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()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant