0

I'm rendering a sphere in 3-space for an app I'm developing, and I'd like to overlay a plane in front of the camera (in the direction it's "looking") when there's a mouse-over event on certain parts of the sphere. The purpose of this plane is to provide the user with information about that part of the sphere. When the user moves the mouse off that part of the sphere, the plane providing the info should disappear. The problem I'm having is that the plane is rendered in front of the camera "object", and not in front of where it's "looking" so that the plane is centered and parallel to the camera in the field of view. Below is an image illustrating the issue:

Three.js cam issue

I'm thinking that I might need to apply some set of rotations to the plane to accomplish this, possibly involving quaternions. Does anyone have any suggestions?

2
  • Like this: stackoverflow.com/questions/31831425/… Aug 10, 2015 at 22:56
  • @WestLangley, thanks - that solution does work if you only want one instance of the object --- but I'm coupling this with THREE.Raycaster(), and it does not work for mouseover events.
    – Ice101781
    Aug 11, 2015 at 1:49

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.