Hi
I want to use billboards, where the center of the billboard is the origin.
until now the geometry for billboards gets created like this:
1 2 3 4 5 6 7 8 9 10 11 12 13
| float halfParticleWidth = width / 2;
float x = 0; float y = 0; float z = 0;
vec[0].set(-halfParticleWidth, 0, 0); vec[1].set(+halfParticleWidth, 0, 0); vec[2].set(+halfParticleWidth, height, 0); vec[3].set(-halfParticleWidth, height, 0); |
I was only able to adjust it my needs by changing the code to:
1 2 3 4 5 6 7 8 9 10 11 12 13
| float halfParticleWidth = width / 2;
float x = 0; float y = 0; float z = 0;
vec[0].set(-halfParticleWidth, -height/2, 0); vec[1].set(+halfParticleWidth, -height/2, 0); vec[2].set(+halfParticleWidth, height/2, 0); vec[3].set(-halfParticleWidth, height/2, 0); |
Is there a better way, or should I add this to IssueZilla?
It's pretty bad to have changes in the Xith-code, because it's for a project (Spacebomber) and you can't request from all to change their Xith. (At least it would be really nasty)
Arne