Your question finally prompted me to dig into as3mod a little deeper, something I was overdue for. Your problem occurs because the default twist vector is (0,1,0), but a plane in away3d has no y vector since it's minimum and maximum y value are both zero. You need to change the vector of the twist modifier to get your plane to bend. For example, after you instantiate your twist modifier, add this line to change its twist vector:
var t:Twist=new Twist(Math.PI/2); t.vector = new com.as3dmod.core.Vector3D(1,0,0); mstack.addModifier(t); and now you should get a twist in your plane. On Apr 27, 5:26 am, dorianleynen <[email protected]> wrote: > Hello all, > > I try to add an AS3DMOD twist modifier to a plane but I do not see any > deformation... > When I try the same code but with a blend modifier, it works... > Do I missing something? > > Here is my code in his simplest form: > > // imports away3D > import away3d.containers.*; > import away3d.primitives.*; > import away3d.core.base.*; > import away3d.core.render.Renderer; > > // imports as3dmod > import com.as3dmod.plugins.away3d.LibraryAway3d; > import com.as3dmod.ModifierStack; > import com.as3dmod.modifiers.Twist; > import com.as3dmod.modifiers.Bend; > import com.as3dmod.core.*; > > var myScene:Scene3D= new Scene3D(); > var view:View3D= new View3D({x:stage.stageWidth/2,y:stage.stageHeight/ > 2,scene:myScene}); > var plan:Plane=new Plane(); > plan=new Plane(); > plan.segmentsW=10; > plan.segmentsH=10; > plan.x=0; > plan.y=0; > plan.rotationX=45; > plan.rotationY=45; > plan.width=300; > plan.height=300; > > addChild(view); > myScene.addChild(plan); > > //AS 3DMOD > var mstack:ModifierStack; > mstack = new ModifierStack(new LibraryAway3d(), plan); > var t:Twist=new Twist(Math.PI/2); > mstack.addModifier(t); > > mstack.apply(); > view.render(); > > ...I imagine that I miss something obvious but i cannot guess what it > is... > > Any clue is welcome. > > Thanks, > > Dorian > > -- > Subscription > settings:http://groups.google.com/group/away3d-dev/subscribe?hl=en
