|
Rotating particle...
#288296
09/05/09 08:25
09/05/09 08:25
|
Joined: Apr 2009
Posts: 248 Philippines
seecah
OP
Member
|
OP
Member
Joined: Apr 2009
Posts: 248
Philippines
|
Hi All,
I just want to ask if there's any way that we can let each particle rotate?
I'm using a bitmap for particle effect and I want it to be rotating as the alpha and lifespan decreases..
We've tried to use a bitmap (xxxx+6.tga) but also doesn't work
Hope anybody can advise...
Thanks
Can't is not an option™
|
|
|
Re: Rotating particle...
[Re: seecah]
#288297
09/05/09 08:47
09/05/09 08:47
|
Joined: May 2008
Posts: 2,113 NRW/Germany
alibaba
Expert
|
Expert
Joined: May 2008
Posts: 2,113
NRW/Germany
|
there was contribution here about rotating particles. search in the lite-c contributions. EDIT: i didnt find it. however, i uploaded it. here: http://ifile.it/6rsbtuadont forget to thank gameus!
Last edited by alibaba; 09/05/09 08:52.
|
|
|
Re: Rotating particle...
[Re: Scorpion]
#288313
09/05/09 10:02
09/05/09 10:02
|
Joined: Apr 2009
Posts: 248 Philippines
seecah
OP
Member
|
OP
Member
Joined: Apr 2009
Posts: 248
Philippines
|
Ahhh.. So there's really no way that you can rotate a particle by not making it a sprite?
Can't is not an option™
|
|
|
Re: Rotating particle...
[Re: seecah]
#288339
09/05/09 12:46
09/05/09 12:46
|
Joined: Jul 2001
Posts: 6,904
HeelX
Senior Expert
|
Senior Expert
Joined: Jul 2001
Posts: 6,904
|
Another option would be to actually "draw" for each angle a version of the bitmap and save it to file. Then, load all bitmaps into an array for instance and use one of the particle skills that stores the "angle". In the particle function you could then evaluate the angle and normalize it back to array index. E.g. if you have 8 bitmaps for 360°, and the angle is 75°, then the array index is
int index = (int)((angle / 360.0f) * 8.0f) % 8;
This looks only good if you have ~15 fps or more. That means, that if you have a cycle in x seconds, you have to have 15 * x frames for your cycles. So, if your sequence (e.g. a full 360° rotation) is done approx. in 0.7 seconds, you would have to have at least 10 frames.
OF COURSE, this is very memory consuming dependant on your particle size and the image compression type. I always recommend DDS for sprites and textures.. this can reduce memory very much.
Best regards, Christian
|
|
|
Re: Rotating particle...
[Re: HeelX]
#288499
09/06/09 21:29
09/06/09 21:29
|
Joined: Jul 2009
Posts: 36
SomebodyNew
Newbie
|
Newbie
Joined: Jul 2009
Posts: 36
|
I always recommend DDS for sprites and textures.. DDS? What is that? Didn't find anything using the forum search.
|
|
|
Re: Rotating particle...
[Re: SomebodyNew]
#288501
09/06/09 21:35
09/06/09 21:35
|
Joined: Oct 2007
Posts: 5,210 Ä°stanbul, Turkey
Quad
Senior Expert
|
Senior Expert
Joined: Oct 2007
Posts: 5,210
Ä°stanbul, Turkey
|
it is not something engine spesific, it means "DirectDraw Surface" some sort of texture format. google it.
3333333333
|
|
|
|