The new dx9 sprite class

Started by
5 comments, last by turnpast 18 years, 10 months ago
Im trying to use the sprite.drawtransform operation and i cant seem to get the sprites to be at the correct location pointing at the camera, any ideas?
-----------------www.stevemata.com
Advertisement
bump
-----------------www.stevemata.com
what kind of sprite class are you talking about/ what version of dx9 are you talking about... last time i checked in the dx9 sdk documentation, there was no such function for the ID3DXSprite interface... restate the question && fix it if necessary.
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/directx9_m/directx/ref/ns/microsoft.directx.direct3d/c/sprite/sprite.asp
-----------------www.stevemata.com
Quote:
Archived content. No warranty is made as to technical accuracy. Content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.


The current directx docs contain no reference to this method and ILDasm does not show it in the Microsoft.DirectX.Direct3D.Sprite namespace.

My advice: don't try to use it. Use the Transform property and call Draw().

Don't know what exactly you mean by "pointing at the camera" are you trying to billboard? Are tou drawing with the ObjectSpace flag set?

Also: Managed DirectX specific question are probably best suited to (and will get abetter response in) the DirectX or the .NET forums.
well, yes im billboarding but im trying to use the spritetransform to do it, i just dont know what matrix to give it or how to correclty mod the matrix to get it to place the sprite and have it pointing at the camera
-----------------www.stevemata.com
I have not done this exact thing myself, but I believe that sprite handles billboarding for you without having to use the Transform property . If I remember correctly you use SpriteFlags.Billboard and supply your world/view transforms with SetWorldViewLH() and sprite will do the rest.

This topic is closed to new replies.

Advertisement