-
Notifications
You must be signed in to change notification settings - Fork 54
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 make the nodes look at the camera at all times without calling refresh ? #39
Comments
@slechanii have you considered using Sprites? The very definition of a Sprite is a (planar) object that always faces the camera POV, which sounds like what you're seeking. |
Thanks for answering quickly! I was indeed using sprites before and it did the job well, the problem is that from I what I saw, using sprites makes it impossible to use hover / onclick events due to a bug with aframe (gathered from past issues and having problems making it work, might have been fixed ?) If it hasn't been fixed it means that I can't use sprites as I need hover & onclick on nodes for what i'm trying to achieve. If sprites are not usable do you have an idea on how I could make the nodes always look at the camera ? Currently I'm facing 2 issues :
Thanks for your help! |
@slechanii the reason behind the Sprite issue in Aframe is mentioned here: #31 (comment) That issue eventually originates in the Aframe module, so there's not a whole lot that can be done to work around it. Similarly, I'm also not sure how easy it would be to implement Sprite-like behaviour without using actual Sprite objects. |
I also encountered this problem and wrote a component to deal with it. Essentially what this does is to wrap each node in an A-Frame
(the line |
Hi, i'm trying to make all my nodes (3D meshes) look at the camera position at all times, I am getting the camera position and making the mesh look at its position whenever its rendered the problem is that it only gets executed when nodeThreeObject is called, is there a way for me to make the nodes look at the camera at all times despite not getting rerendered ?
EDIT : After running some tests I found out that while I'm getting a camera, the vector is always (0,0,0) (even atfer moving the camera and triggering a rerender), here is the code I'm using to get the camera and print the position vector inside the nodeThreeObject :
Thanks.
The text was updated successfully, but these errors were encountered: