Questions about texture&transparent&objectTouchEvent

Started by denzel, March 22, 2012, 06:45:23 AM

Previous topic - Next topic

denzel


Let`s go. :) :)

Q-1:There is a scene has so much models with textures,what should i do to map the texture to the right model?I guess there`s a way besides TextureManager.add(...) & Object3D.setTexture(...),but i cant find it.

Q-2:In the scene there are some models are translucent, when i use Object.setTransparency(int trans), it works.But after that i use mergeAll to an Object3D,the translucent is gone.Why?

Q-3:When i touch the screen how can i know which model is being touched?I need to move the model to a position.

denzel

Q-1 is done!
Yes,there's a way to do this ;D,i found it!
Just load the texture with the name exactly as same as the texture'name used in the model, it's case-sensitive i guess.

zammbi

QuoteJust load the texture with the name exactly as same as the texture'name used in the model, it's case-sensitive i guess.
Yep :) Just to note, iirc I also found converting between model formats, sometimes the texture names have max length, which causes some names to be cut short.

QuoteBut after that i use mergeAll to an Object3D,the translucent is gone.Why?
I believe you need to set the transparency again(as one object). If you don't want to set the whole object as transparent then don't merge them.

Quote
Q-3:When i touch the screen how can i know which model is being touched?I need to move the model to a position.
Have a search around the forums(try the search bar first), I believe I've seen this topic being talked about a number of times.