ID3DXSprite billboard

Started by
4 comments, last by njpaul 18 years, 7 months ago
what's the point is having a billboarded ID3DXSprite object? it can't be further than 1.0f on the Z axis anyway? can someone explain the ups and downs of using billboarded ID3DXSprites
-------------------------Unless specified otherwise, my questions pertain:Windows Platform (with the mindset to keep things multi-platform as possible)C++Visual Studio 2008OpenGL with SFML
Advertisement
anyone know what it's for?
-------------------------Unless specified otherwise, my questions pertain:Windows Platform (with the mindset to keep things multi-platform as possible)C++Visual Studio 2008OpenGL with SFML
I am no expert on the specifics of your question, but here is what I would expect the behavior to be:

the billboard creates a sprite that is always facing the camera. This is good for doing things like putting character names above their heads or other UI elements in 3d space, as you will never want to see them at an angle.

As for only being able to go to 1.0f on the z-axis, it is probably in parameterized form, meaning that 0.0f is the location of the camera (or the near clip range, not sure which), and 1.0f is the far clip plane (ie, the farthest distance something can render.

Thus, if your render can render 1000 meters and you want something 60 meters away, put it at 0.06f and it will show up in the correct location.

Hope that helps!
-Az
If you pass the D3DXSPRITE_OBJECTSPACE flag, then your sprites are world objects just like any other. In this case if you want them to face the camera (and you typically would) you would pass the billboard flag as well.
Stay Casual,KenDrunken Hyena
where do i pass that into?
-------------------------Unless specified otherwise, my questions pertain:Windows Platform (with the mindset to keep things multi-platform as possible)C++Visual Studio 2008OpenGL with SFML
Into the begin function of the sprite interface.

This topic is closed to new replies.

Advertisement