FORUM CLOSED, PLEASE REGISTER AT FORUM.SIO2INTERACTIVE.COM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Fading an object at runtime

2 posters

Go down

Fading an object at runtime Empty Fading an object at runtime

Post  phil Tue Apr 28, 2009 1:37 pm

I have an object that I'd like to fade at runtime ... in UiKit, of course, I would just set alpha from 1.0 successively closer to 0.0. Is there an equivalent way to do this?

Note: the object is a plane with an image texture (if that helps).

Thanks,

-Phil

phil

Posts : 7
Join date : 2009-04-10

Back to top Go down

Fading an object at runtime Empty Re: Fading an object at runtime

Post  uprise78 Tue Apr 28, 2009 2:26 pm

Same thing as UIKit...just fade the alpha of your material.

Check out the wiki (http://sio2interactive.wikidot.com/) and look for the how to work with materials section. Also, check out sio2_material.h file.

If I recall, you can do it something like this (may or may not work...i dont have source in front of me right now):

Code:

someMaterial->alpha -= 0.2f;

uprise78

Posts : 228
Join date : 2008-10-31

Back to top Go down

Fading an object at runtime Empty solved

Post  phil Wed Apr 29, 2009 8:53 am

It's solved by setting _SIO2material->diffuse->w to the alpha value you want ...

phil

Posts : 7
Join date : 2009-04-10

Back to top Go down

Fading an object at runtime Empty Re: Fading an object at runtime

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum