Hi guys,
I was wondering how to do texture animation on a billboard using the 2d tutorial´s daemon´s texture.
I mean, apply a rectangle from a texture to a billboard and change it every 30frames, for example.
I know that the method draw2dImage() has a parameter to expecify the piece of texture to render to, but i cant find some kind similar method about billboards.
I supose that i can do this using diferent image files and switching between them using setTexture() method, but if i could use just one texture file (like daemon example) it would be better, you know.
Anyway, if there isnt a method to do it, can i access to the billboard´s map coordinates and adjust it manually??
I hope that i explained myself..
thx in advance!!
Cheers
How to do Sprite Animation into a Billboard
How to do Sprite Animation into a Billboard
------------------------------------------------
Irrlicht Ussers Map
Join now!!
http://www.frappr.com/irrlichtusers
Irrlicht Ussers Map
Join now!!
http://www.frappr.com/irrlichtusers
The way i've done this is to use a texture animator (look it up in the API). Into that you specify the textures to animate between and the speed to animate and it works nicely.
Possibly you want to do some walking animation and then might want to change to an attacking animation or something right? In which case that wouldn't work so well for you maybe. Although i guess when you changed from walking to attacking (or whatever) you could just switch the texture animator on the billboard...
There was talk of exposing the UV coordinates of billboards so that you could change them to animate with just one texture but that's not available yet i don't think.
Possibly you want to do some walking animation and then might want to change to an attacking animation or something right? In which case that wouldn't work so well for you maybe. Although i guess when you changed from walking to attacking (or whatever) you could just switch the texture animator on the billboard...
There was talk of exposing the UV coordinates of billboards so that you could change them to animate with just one texture but that's not available yet i don't think.
-
- Admin
- Posts: 3590
- Joined: Mon Oct 09, 2006 9:36 am
- Location: Scotland - gonnae no slag aff mah Engleesh
- Contact:
Yup, I've got a patch in the tracker that (among other things) exposes UVs, but we're on a feature freeze until 1.4 is put to bed, so if you want it now, then you'll have to do a SVN checkout, apply the patch and rebuild locally.
If you have any requests or suggestions for billboard enhancements, then I'd be delighted to take a swing at implementing them.
If you have any requests or suggestions for billboard enhancements, then I'd be delighted to take a swing at implementing them.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Thx both
I´ll try the JP´s option, i think that it is easier and might get what i want
Thx guys!!
I´ll try the JP´s option, i think that it is easier and might get what i want
Thx guys!!
------------------------------------------------
Irrlicht Ussers Map
Join now!!
http://www.frappr.com/irrlichtusers
Irrlicht Ussers Map
Join now!!
http://www.frappr.com/irrlichtusers