interactive (adding listeners to) DAE model in flex + papervision
I have a DAE model that is parsed into several parts. I am able to deal with them separately, such as changing their ma开发者_开发技巧terial or colour but I am having problems adding click or hover listeners over the children.
For example, lets say I have a model of a kitty where each facial feature is a child. I want to be able to hover or click the features and have a window pop up explaining the feature.
I've tried parsing the model and adding listeners but it doesn't seem to work.
Thanks in advance!
L
Hard to pin point the problem from your description, but you could check the following:
- Make sure your viewport is interactive
- Make sure the material your material is interactive
- Make sure the DisplayObject3D you assign the listener to is not null.
Point 3, with collada objects, you can have nested objects, make sure you add a listener to an object that has geometry, not an empty(no geometry) container. With points 1,2, both viewport and material have a Boolean property called interactive which must be set to true for mouse events.
HTH
精彩评论