Fading an object at runtime
2 posters
Fading an object at runtime
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
Note: the object is a plane with an image texture (if that helps).
Thanks,
-Phil
phil- Posts : 7
Join date : 2009-04-10
Re: Fading an object at runtime
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):
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
solved
It's solved by setting _SIO2material->diffuse->w to the alpha value you want ...
phil- Posts : 7
Join date : 2009-04-10
Similar topics
» Loading Additional Object At Runtime
» SIO2Splash fade - not fading with multiple render windows
» save runtime
» duplicating objects at runtime and changing textures on the duplicated objects
» physics object inside another physics object
» SIO2Splash fade - not fading with multiple render windows
» save runtime
» duplicating objects at runtime and changing textures on the duplicated objects
» physics object inside another physics object
Permissions in this forum:
You cannot reply to topics in this forum