Author Topic: Questions about texture&transparent&objectTouchEvent  (Read 742 times)

Offline denzel

  • byte
  • *
  • Posts: 22
    • View Profile
Questions about texture&transparent&objectTouchEvent
« on: March 22, 2012, 06:45:23 am »

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.

Offline denzel

  • byte
  • *
  • Posts: 22
    • View Profile
Re: Questions about texture&transparent&objectTouchEvent
« Reply #1 on: March 22, 2012, 08:17:33 am »
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.

Offline zammbi

  • float
  • ****
  • Posts: 360
    • View Profile
Re: Questions about texture&transparent&objectTouchEvent
« Reply #2 on: March 22, 2012, 08:47:18 am »
Quote
Just 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.

Quote
But 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.