Billboarding Y-Axis fixed Sprite

Started by Jamiro, July 08, 2018, 03:56:57 PM

Previous topic - Next topic

Jamiro

Hello,

I know we can change the billboarding matrix of an object, I tried to play around with this but without success, so my question is:

How can I make a matrix to simulate a billboarding effect while keeping its vertical axis fixed, as the example bellow shows in the first case?



can anyone give me an example of what this matrix should be to have the desired effect?

Thanks

EgonOlsen

Maybe you can take the normal billboard matrix and apply a rotation around the object's x axis to that matrix in a second step?

Jamiro

In that case wont I stil have the tilting of the relative Y axix of the object? I don't understand much about matrices but can I just  set a value to a fixed zero or 1 to always make it steady on its relative Y axis?

and also, is there even a name for this? os some concept for this type of billboarding that I can look for?

Jamiro

Ok, so I just need to ask 1 simples question, do I need to update the billboarding matrix on each draw step? Or is the matrix itself capable of using camera space and need only to be changed once?

so, when I choose setBillboarding(true) will the jpct engine update on each frame the matrix according to the camera facing vector?

many thanks


EgonOlsen

Quote from: Jamiro on July 11, 2018, 03:36:20 PM
so, when I choose setBillboarding(true) will the jpct engine update on each frame the matrix according to the camera facing vector?
Yes, it updates it every frame. And so should you.