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

How to animate a model to turn to a position such that it always shows a particular side of the model? #53

Open
KnightCoder opened this issue Apr 29, 2020 · 1 comment

Comments

@KnightCoder
Copy link

Lets say that I've a model of an animal and the user rotates the animal in any direction but once the user clicks a button "Turn to show face" the 3D model should animate turning to show the animal's face, no matter in which angle it was rotated previously by the user.

How can I achieve this? Is there a function/property where we can set lets say the absolute angle (not relative angle) value?

@KnightCoder
Copy link
Author

I noticed a transform.orientTo method. I even tried this it turned the model but it didn't animate the turning.
Is this method correct? If yes, how can I make it animate the turn? Can you please give a short example?

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