When CreateSprite3D() is called, 8 internal values are set by default: they allow the GPU to localize the 4 corners in the source sprite in order to fill the 3D sprite texture.
The default values are:
u0 = 0.0
v0 = 0.0
u1 = 1.0
v1 = 0.0
u2 = 0.0
v2 = 1.0
u3 = 1.0
v3 = 1.0
What is could be very interesting, it would be possible (if it's not already done anywhere...) to change (dynamically if possible) these 8 floating values.
The function syntax would look like this:
Code: Select all
SetSprite3D(Sprite3DNumero.I, u0.F, v0.F, u1.F, v1.F, u2.F, v2.F, u3.F, v3.F)
- modify the orientation of the texture in the 3D sprite, and also the presentation of this texture in the basic mesh of the 3D sprite for a better control (really a full control) of the 3D deformation. The user got also a 3D sprite like this (representation of the 2 triangles) : |/|, and newly like this too : |\|. Don't do the mistake imagining this is not important : it's very usefull.
- (if dynamically) a quick scale of the texture.
- (if dynamically) a quick rotation of the texture.
- (if dynamically) a quick scrolling (=smooth scrolling)
I use the word "dynamically" to tell this new possible function (SetSprite3D() ) like we can actually use TransformSprite() in a 3D display loop.
Thank you and happy new year.
Ollivier