Can’t acces a property or method of a null object reference in AWPBvhTriangleMeshShape.as:17

Software: Away3D 4.x

Tim Baas, Newbie
Posted: 19 December 2011 10:44 AM   Total Posts: 7

Hello 3Developers! smile

When I load a Cinema4D exported model with the Loader3D and then put it’s mesh into the AWPBvhTriangleMeshShape, this error is thrown:

TypeErrorError #1009: Kan geen eigenschap of methode benaderen via een verwijzing naar een object dat null is.
 
at awayphysics.collision.shapes::AWPBvhTriangleMeshShape()[/Users/timbaas/actionscript/source/Away3D/away3dphysics/awayphysics/collision/shapes/AWPBvhTriangleMeshShape.as:17]
 at Blastles
/initScene()[/Users/timbaas/actionscript/applications/Blastles/src/Blastles.as:138] 

Here is the code:

terrain = ( preloader.getModel('terrain') as ObjectContainer3D )

   
terrainMesh Mesh(terrain.getChildAt(0));
   
terrainMesh.material material;
   
   
terrainShape  = new AWPBvhTriangleMeshShapeterrainMesh.geometry ); 

I’ve tried different exports in C4D (.obj, .3ds, .dae ), all the same error..

Am I missing something here?

Thanks!

 

   

Tim Baas, Newbie
Posted: 19 December 2011 11:00 AM   Total Posts: 7   [ # 1 ]

Also tried to convert it to awd with preFab. Still the same error.

Are there some things I need to know before exporting this model from cinema? I’ve triangulated it, but don’t really know what I could do more..

Thanks!

   

Tim Baas, Newbie
Posted: 19 December 2011 11:08 AM   Total Posts: 7   [ # 2 ]

Found my problem!

DynamicsWorld wasn’t created when I created the AWPBvhTriangleMeshShape.

MondayMorning issues..

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X