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 select the point of object rotation? #405
Labels
Comments
You can do it this way... say you want the axis position be at ( -100, 0, 0 ): var dummy = new THREE.Object3D();
var your_object = new THREE.Mesh( geometry, material );
your_object.position.x = 100;
dummy.addChild( your_object );
scene.addObject( dummy ); |
Thanks! That was very helpful |
When I try this var dummy = new THREE.Object3D();
var your_object = new THREE.Mesh( geometry, material );
your_object.position.x = 100;
dummy.addChild( your_object );
scene.addObject( dummy ); It show "Uncaught TypeError: dummy.addChild is not a function at :4:11" this error |
|
@merbin2012 You can instead translate the geometry: See this stackoverflow answer. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello!
I made the model using Blender. If I use mesh.rotation.y - it rotates, but around the one fixed point (axis). If I move the object (mesh.position.x) - it moves, but the rotation axis stay in the same place relative to the object.
How can I select the rotation axis position?
//Sorry for my English. I'm not a native English speaker
The text was updated successfully, but these errors were encountered: