www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: denzel on March 22, 2012, 06:45:23 am

Title: Questions about texture&transparent&objectTouchEvent
Post by: denzel 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.
Title: Re: Questions about texture&transparent&objectTouchEvent
Post by: denzel 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.
Title: Re: Questions about texture&transparent&objectTouchEvent
Post by: zammbi 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.