I'm using Away3D 3.6 and I'm loading a .OBJ file and assigning it to an Object3D object.
e.g.
var obj:Object3D = Obj.parse( obj开发者_如何学运维Data );
obj.rotationY = 35;
view.render(); // this renders the object with a 35º rotation
// (time lapse code)
obj.rotationY = 90;
view.render(); // this does not render the object with a 90º rotation, why??
There is a time lapse between the time that I apply a 35º rotation and the time that I apply a 90º rotation, but only the first is rendered. Why?
It works fine if I set obj = new Cube();
Add an event listener
addEventListener(Event.ENTER_FRAME, _handleEnterFrame);
Then in the _handleEnterFrame function try this:
private function _handleEnterFrame(ev : Event) : void { obj.rotationY += 1; _view.render(); }
Works for me.
精彩评论