开发者

How to apply bend on a cube using AS3DMod and Away3D?

I am having some problems with the away3D library. I want to apply a bend to a cube using AS3DMod, but i can't seem to get it working. My cubes kind of get mutilated when i want to bend them :p they bend to all directions and i can't seem to find a pattern in the bending. anyone have any experience (or advice) with this? thanks in advance.

private function bend(e:MouseEvent3D):void
{
    //We get the current target.
    var _target:Cube = e.target as Cube;

    //We create a new modifier.
    var _bend:Bend = new Bend(2);
    _bend.constraint = ModConstant.LEFT;
    _bend.bendAxis = ModConstant.LEFT;

    var _mod:ModifierStack = new ModifierStack(new LibraryAway3d(), _target);
    _mod.addModifier(_bend);

    //We play the modification.
    _mod.apply();

    //We render the scene.
    render();
开发者_运维技巧}


--same problem, saw this book w/ as3dMod examples that also didn't work, finally found "errata" page from author explaining the as3d mod library is outdated. he posted some fixes to download here: http://blog.alladvanced.net/away3d-3-6-cookbook/

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜