How do I rotate a child object from a 3ds model?

Software: Away3D 4.x

edgar, Member
Posted: 18 December 2011 04:03 PM   Total Posts: 52

Hello everyone,

I have created a car with wheels in Blender. The car is the parent of the four wheels. How do I rotate the wheels in away3d?

This is how I created the car in away3d:

/code/

smartMaterial = new BitmapFileMaterial(“assets/smarttexture.png”);
  smartMaterial.bothSides = true;
  smartMaterial.ambient = 0.6;
  smartMaterial.ambientColor = 0xFFFFFF;
  smartMaterial.specularColor = 0xFFFFFF;
 
 
  smartMaterial.lights = [light1];
 
 
 
  // Load a 3D model into a container
  smartCar = new ObjectContainer3D();
 
   
  // Load the model
  Loader3D.enableParser(Max3DSParser);
 
  loader = new Loader3D();
  loader.addEventListener(LoaderEvent.RESOURCE_COMPLETE, onResourceComplete);
  loader.addEventListener(LoaderEvent.DEPENDENCY_ERROR, dependancyErrorHandler);
  loader.load(new URLRequest(“assets/smartroadster.3ds”));
 
  smartCar.addChild(loader);
  view.scene.addChild(smartCar);
  smartCar.scale(200);
  smartCar.rotationY = 65;
/code/


And: How do I create a shadow from the car on the ground?

Many thanks

Edgar

   

Avatar
Baush, Sr. Member
Posted: 20 December 2011 01:27 PM   Total Posts: 135   [ # 1 ]

Try looking up the subgeometries attribute for your mesh and apply a transformation to it. Otherwise, you should use 2 different 3ds meshes that you combine within an objectcontainer3d

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X