Sign in to follow this  
Plazunka

Using LPD3DXSPRITE with a camera

Recommended Posts

Hi, I seem to have a problem using the sprite handler in conjunction with a 3D camera. When I translate the camera, the sprites remain fixed in the exact same location on the screen, no matter how I orient the camera even though the sprites remain in the exact same location. I know the camera is working because I also have a textured quad located in the scene and it appears to move when I translate the camera, but not the sprite. It's like the sprites are being drawn with respect to the camera space and not the world space.

Share this post


Link to post
Share on other sites
I mever used ID3DXSprite in 3d space, but maybe you use D3DXSPRITE_BILLBOARD flag to render the sprites? If so you might want to turn it off for it causes the sprites to always face the user.

You might also want to check out ID3DXSprite's setWorlViewLH and setWorldViewRH functions (see DXSDK Documentation).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this