[Papervision3D] how to make a 3d object interactive

barbara barbara.yersin at gmail.com
Wed Aug 6 08:24:16 PDT 2008


Hello!

I'm using Flex and PV3D. I had a lot of troubles before in order to make the
UI pass in front of the viewport. I finally managed (see this post
http://www.nabble.com/Flex-UI-behind-papervision-objects-tt17583522.html#a17686149
).
Today however, I've rewritten my whole code, trying to better distribute my
it on several components and mxml files.
I've managed to re-put the viewport behind the UI, but It has become
completely uninteractive. I've tried all sorts of tricks, including the
solutions presented here, but it's as if there was a transparent flex UI in
front of the viewport that was blocking the eventlisteners. Is it even
possible?
Any idea?




dsdsdsdsd wrote:
> 
> whoo hoo - my first pv3d interaction ... thanks;
> 
> 
> one thing though:
> dae.getMaterialByName("material_you_named").interactive=true; 
> needs to be located somewhere PRIOR to the onClick method, not inside of
> it;
> 
> 
> 
> thanks niki77;
> 
> 
> 
> 
> 
> niki77 wrote:
>> 
>> // if you want to pick something in your viewport
>> var viewport:Viewport3D = new Viewport3d();
>> viewport.interactive=true;
>> viewport.interactiveSceneManager.addEventListener(InteractiveScene3DEvent.OBJECT_CLICK,onClick);
>> 
>> // onClick
>> private function onClick(e:InteractiveScene3DEvent):void
>> {
>>     // if do3d' material isn't interactive, you can't pick so
>>     (dae.getMaterialByName("material_you_named")).interactive=true;
>>     // if you want to know what is picked
>>     trace("clicked:"+e.displayObject3D.name);
>> }
>> 
>> 
>> dsdsdsdsd wrote:
>>> 
>>> so then there are 2 distinct methods:
>>> 
>>> 1 - materials
>>> 2 - displayobject3d's themselves
>>> 
>>> 
>>> ?????
>>> 
>>> 
>>> thanks
>>> Shannon Burnett
>>> 
>>> 
>>> 
>>> 
>>> John Grden-2 wrote:
>>>> 
>>>> I'll do another tutorial and post it this week.
>>>> 
>>>> The basics are that your viewport has to be interactive, then any  
>>>> material u want interactive, set it's interactive property to true.  U  
>>>> can receive pure mouse events on your movieclip that's used as a  
>>>> material source or listen for InteractiveScene3DEvents on the  
>>>> displayobject3d's themselves
>>>> 
>>>> Hth,
>>>> John
>>>> 
>>>> Sent from my iPhone
>>>> 
>>>> On Jul 30, 2008, at 8:12 PM, dsdsdsdsd <shannonhburnett at hotmail.com>  
>>>> wrote:
>>>> 
>>>>>
>>>>> hello;
>>>>>
>>>>> it seems that in order for objects to be interactive, they must have
>>>>> interactive materials;
>>>>>
>>>>> is there a first step for learning about interaction with models?
>>>>>
>>>>>
>>>>> thanks
>>>>> dsdsdsdsd
>>>>> -- 
>>>>> View this message in context:
>>>>> http://www.nabble.com/how-to-make-a-3d-object-interactive-tp18745361p18745361.html
>>>>> Sent from the Papervision3D mailing list archive at Nabble.com.
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Papervision3D mailing list
>>>>> Papervision3D at osflash.org
>>>>> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>>>> 
>>>> _______________________________________________
>>>> Papervision3D mailing list
>>>> Papervision3D at osflash.org
>>>> http://osflash.org/mailman/listinfo/papervision3d_osflash.org
>>>> 
>>>> 
>>> 
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/how-to-make-a-3d-object-interactive-tp18745361p18853595.html
Sent from the Papervision3D mailing list archive at Nabble.com.




More information about the Papervision3D mailing list