freetoplay Posted September 9, 2018 Share Posted September 9, 2018 I have a mesh that rotates around the y axis after some pointer events. How can I reset the rotation to the initial position (the position that you see when you first load the playground)? Here is the playground code: http://www.babylonjs-playground.com/#TT2BK1#9 Quote Link to comment Share on other sites More sharing options...
Gijs Posted September 9, 2018 Share Posted September 9, 2018 rotMesh.rotation.y = 0; ? Quote Link to comment Share on other sites More sharing options...
brianzinn Posted September 9, 2018 Share Posted September 9, 2018 rotMesh.rotation is ignored when quaternions are used: http://www.babylonjs-playground.com/#TT2BK1#10 That PG will reset to initial rotation, if you don't move the mesh for 2 secs. edit: better to use the scene to add event listeners freetoplay 1 Quote Link to comment Share on other sites More sharing options...
Guest Posted September 10, 2018 Share Posted September 10, 2018 Flagging as solved Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.