Have you transformed their vertices into world space ? I believe this is you problem :)
Sent from my iPhone On Nov 26, 2010, at 3:24 PM, Darcey Lloyd <[email protected]> wrote: > Hi Michael, > > I done the AS3Dmod route but it's not quite a flip rotate effect you can get > with it, also offset center on twist is not set, tried hacking this manually > and attached it to some sliders resulting in some weird effects. Some were > quite cool lol. > > The AS3DMod solution was to rotate 180 deg and use a twist phase tweened from > 0 to pi. Which applied and removed the twist, visually this looks ok, but I > know it's a twist applied to a point where it doesn't fold/wrap onto itself > then removed. > > I am thinking along the lines of using getTimer to push interval to move > along an array of vertices and then to apply the equation to them handling x > and y or segments. I will have to get more into the matrix multiplication > tests. Not sure how a matrix is applied in scaling values from left to right > of a planes segments.. Again more tests I need to do. > > I was just surprised why 2 planes same size and segments, 1 rotated, both > vertices[0] traced out the same values... I was visualising the segments of a > plane as a 2D array of vectors if you know what i mean ;) > > R&D continues. > > D > > > > On 26 November 2010 12:33, Michael Iv <[email protected]> wrote: > The clue for your solution is to set a rotation for matrix and then multiply > you vectors by it . Also why don't you look into as3dmod . I think you have > got all you need there > > Sent from my iPhone > > On Nov 25, 2010, at 2:42 PM, Darcey Lloyd <[email protected]> wrote: > >> Hi, >> >> I need some R&D on this but if anyone could assist. I am trying to rotate a >> plane but with a twist effect. >> >> So I thought, make 2 planes, 1 visible and 1 not visible with identical >> number of segments and dimensions. >> Rotate plane 2 (the invisible 1 180 degrees + of the visible plane) then >> tween each of it's vertices to match the invisible planes vertices. However >> I find that: >> >> p1.vertices[0] = new Vertex(-400, 0, -400) >> p2.vertices[0] = new Vertex(-400, 0, -400) >> >> How is rotation calculated? >> >> I know the above would just tween from point to point and give a messed up >> effect, but once I get this working I was going to extend it to have a 1/2 >> circle sin/cosine equation to tween from p1.vertex[0].x,y,z to >> p2.vertext[0].x,y,z >> >> I did some googling and then ended up in c++ forums where matrix >> translations went a tad over my head lol >> >> In the Away3D examples there is the code - which applies a sin and cosine >> wave to plane via its vertices. >> for (var x:int = 0; x <= plane.segmentsW; x++){ >> for (var y:int = 0; y <= >> plane.segmentsH; y++){ >> plane.vertex(x, y).y = >> 150*Math.sin(dist(x-plane.segmentsW/2*Math.sin(t/2000), >> y-plane.segmentsH/2*Math.cos(t/9000))/2+t/200); >> } >> } >> >> I am trying to adapt this to create a plane flip that achieves this rotation >> in a twist effect. >> >> Any ideas? >> >> >> Thanks >> >> Darcey >> >
