yan_rez Posted May 6, 2021 Share Posted May 6, 2021 How can I have an ThreeJS object rotate on an axis that is at angle. Like from this codepen I made, the left square rotates on its center and moved up when you click on the "rotate up" button. I want the left cure rotate along the red axis in the image attached and move along on that axis when click on the "Rotate 45 degree" button. I can make up move along the axis, but the rotation is wrong. How can I make the cute rotate along the red axis? See the Pen MWpYggY by eforblue (@eforblue) on CodePen Link to comment Share on other sites More sharing options...
OSUblake Posted May 6, 2021 Share Posted May 6, 2021 This is more of a three.js question. Try searching for how to rotate on axis. Once you figure that out, it should be relatively easy to animate with gsap. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now