Hi Shawn, im struggling in a last question here, i want to know the distance from something to camera, for using like opacity depth based, as i don´t know how to calculate correctly pi and sin in this case, maybe correcting some step of current card (like a ring of cards)
this gives me a value range, but when i zoom the camera obviously it changes... but maybe i can compensate with some multiplication... maybe not the smart way
but it´s a value ranging from 15 to 20... i even tried to nail z down to 0 of groups.. and it goes from 2.1 to 4
there´s a way to get just consistent 0 to 1 or something like -1 to 1?
or even some math to calculate a sin/cos like to make opacity of each card goes down and up for the next one in rotation?
closing this issue, i changed to threejs as they fixed some stuff, i know that i will lost water performance but i need to calculate the z and also im integrating now css on gl for websites...
Hi Shawn, im struggling in a last question here, i want to know the distance from something to camera, for using like opacity depth based, as i don´t know how to calculate correctly pi and sin in this case, maybe correcting some step of current card (like a ring of cards)
it´s inspired in threejs strategies, but i got static values instead of dynamic, any clue? THANKS!
this also gives a constant value of 0.06495423305620554:
edit:
i got a way of working with distanceto method
this gives me a value range, but when i zoom the camera obviously it changes... but maybe i can compensate with some multiplication... maybe not the smart way
i got consistent value subtracting
but it´s a value ranging from 15 to 20... i even tried to nail z down to 0 of groups.. and it goes from 2.1 to 4
there´s a way to get just consistent 0 to 1 or something like -1 to 1? or even some math to calculate a sin/cos like to make opacity of each card goes down and up for the next one in rotation?
Sorry asking a lot, Thanks by all your efforts.