make jiglib cube lookat camera

Software: Away3D 4.x

mkfui, Jr. Member
Posted: 09 November 2016 08:18 AM   Total Posts: 31

i use jiglib to create this starget, i try to make it lookat camera but not success, therefore i made a planegeometry call targetex, and make this jiglib cube rotate by following planegeometry’s orientation, this is not the right way, it work but with error massage, can anyone pls help me solve this problem ?   

starget = physics.createCube(stargetmat, 500, 500, 0.01);

targetex = new Mesh(new PlaneGeometry(500, 500, 1, 1, false, false), Mat2);
 
targetex.lookAt(new Vector3D(0, 400, 1977), Vector3D.Y_AXIS);

starget.rotationX = targetex.eulers.x;
starget.rotationY = targetex.eulers.y;
starget.rotationZ = targetex.eulers.z;

   

mkfui, Jr. Member
Posted: 12 November 2016 08:43 AM   Total Posts: 31   [ # 1 ]

Error: Parameter child cannot be null.
at away3d.containers::ObjectContainer3D/addChild()
at away3d.containers::Scene3D/addChild()
at bullet()

sir, what this mean ?

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X