Text facing 3d camera without peasy
in
Processing with Other Languages
•
8 months ago
Hello everyone,
I've got a 3d data viz sketch that I want to put on a web page using processing.js. Unfortunately, this means that peasy cam is out. I've created a simple camera on weak springs setup that sort of moves around the scene, but I want to display text that always faces the camera. With peasy, this is really easy with the getRotations() function. I was hoping that there was a simple way to get this from the processing camera, but it appears that there isn't, and i've run into a world of quaternions and matrices and euler angles.
Can anyone explain to me how I can find the correct rotation angles? I've looked at the peasy code and it's just a little beyond me.
Information that I have in the sketch to work with is the camera setup information (eye position, lookat position, up vector). Shouldn't this be enough to calculate the angles?
Thanks!
1