开发者

Away3d - Object3D won't update

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜