mark772 Posted August 28, 2021 Share Posted August 28, 2021 Hello! I am trying to accomplish this effect https://greensock.com/docs/v2/Plugins/DirectionalRotationPlugin on a 3d scene. So basically i want the camera to transition to the point selected and not jump to it as it is right now. How can i do that? See the Pen VwWvrXM by mark772 (@mark772) on CodePen Link to comment Share on other sites More sharing options...
GreenSock Posted August 29, 2021 Share Posted August 29, 2021 Welcome to the forums, @mark772. I'm not much of a ThreeJS guy - I didn't notice any rotation animations at all in your demo. Did I miss something? Was there a GSAP-specific question we can help with? Directional rotation is baked into GSAP for regular DOM elements but obviously that won't help here since you're using a ThreeJS object. It wouldn't be terribly difficult to do what you're asking in a helper function or onUpdate, though. It'd help a lot if you just created the most minimal demo possible (strip out EVERYTHING you can) and focus it on a single GSAP question (like "notice how it's rotating in the wrong direction here - how can I make it go the other way?") - that'll significantly increase your chances of getting a good answer here. 1 Link to comment Share on other sites More sharing options...
Cassie Posted August 29, 2021 Share Posted August 29, 2021 There's also really good three.js forums! - https://discourse.threejs.org/ 3 Link to comment Share on other sites More sharing options...
mark772 Posted August 29, 2021 Author Share Posted August 29, 2021 Thanks for your responses! I will try to have as minimal of a demo as possible on future questions. I managed to get the desired animation by tweaking the coordinates (actually using only the Y coordinate). See the Pen rNwOPOv by mark772 (@mark772) on CodePen 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