You are right there is but only in ObjectContainer3D . The problem is that
in the new JigLib JCar Class the parameter for 3d object must be a mesh and
not a ObjectContainer3D
so it should be like this:
*nCar=new JCar(new Away3dMesh(df as Mesh));* where df is my collada loaded
Object . The problem is that when I cast it as mesh  I am getting error
about null object reference
I am breaking my head already for several days about the question how to
work it around!!! The problem is that eventually I need the Collada Object
to be a ObjectContainer3D in order to get the referrence
to the car's parts.

Now can I cast the Collada Object as Mesh and as ObjectContainer3D in the
same time?

On Wed, Jul 29, 2009 at 6:17 PM, Rob Bateman <[email protected]> wrote:

> yes there is!
>
> var model:ObjectContainer3D = Collada.parse(myCollada);
> var rfWheel:Mesh = model.getChildByName("rfWheel") as Mesh;
> var lfWheel:Mesh = model.getChildByName("lfWheel") as Mesh;
> var rbWheel:Mesh = model.getChildByName("rbWheel") as Mesh;
> var lbWheel:Mesh = model.getChildByName("lbWheel") as Mesh;
>
> should work for you, using the correct names
>
> if you are ever doubtful on what material and mesh names are contained
> within a collada file, you can write the following at the top of your app:
>
> away3d.core.utils.Debug.active = true;
>
> this will print a load of parsing information into the trace window,
> including the names of all materials and meshes found
>
> hth!
>
> Rob
>
> On Tue, Jul 28, 2009 at 12:54 PM, SasMaster <[email protected]> wrote:
>
>>
>> I am building a vehicle in JigLibFlash and I need to access parts
>> (wheels) of the car model which I imported in DAE  in order to rotate
>> them in phys engine. Collada Class in pv3d gives a function
>> getChildByName but in away3d there is no such a method. Any Help on
>> this subject?
>> Thanks
>
>
>
>
> --
> Rob Bateman
> Flash Development & Consultancy
>
> [email protected]
> www.infiniteturtles.co.uk
> www.away3d.com
>

Reply via email to