Hi,
I am wondering how I could keep an object's location static with regard to the camera.
I.e. I have two objects, one which I want to observe from multiple angles using the trackball camera and another one which should always remain static with regard to the current camera view.
E.g. overlaying a mesh (to be observed from multiple angles using the trackball camera) on an image (static position with regard to trackball camera).
Hope I explained my question alright.
Thanks for any advice :)
Maybe something like this?
object.position.copy( camera.position );
object.rotation.copy( camera.rotation );
object.updateMatrix();
object.translateZ( - 10 );
This works great! I missed the translateZ part. Thanks a million!
Yay! ^^
Hi. What if I want this object spin itself? http://arielbarrios.com/mycube/clean.html shoul use other tecnic
Maybe something like this?
object.position.copy( camera.position ); object.rotation.copy( camera.rotation ); object.updateMatrix(); object.translateZ( - 10 );
For me, this moves the object in the exact opposite direction. Maybe because I'm using camera.lookAt()
?
Maybe because I'm using camera.lookAt()?
Hard to tell without seeing your complete code. But please share it not here but at the forum which is the intended place for help requests.
Most helpful comment
Maybe something like this?