Rotation on pivotPoint. It doesn’t work in Away3D 4.x when it works in 3.6 correctly.

Software: Away3D 4.x

scutterry, Newbie
Posted: 10 October 2011 08:40 AM   Total Posts: 17

My custom cube’ pivot point at zero point(0,0,0) .But i changed it to vertex (width / 2, height / 2, depth / 2). It works correctly in 3.6, but not in 4.0, it also rotates on zero point (0,0,0)
The following code, just the example AdvancedRotation in chater 4 in Away3D 3.6 cookbook (page 125):

var vector:Vector3D=new Vector3D(0,0,1);
var 
mouseVector:Vector3D=new Vector3D(oX mouseXmouseY oY0);
var 
resVector:Vector3D;
resVector=vector.crossProduct(mouseVector);
resVector.normalize();

var 
mtr:Matrix3D=new Matrix3D();
var 
rotDegrees:Number=Math.PI*Math.sqrt(Math.powmouseX oX 2) + 
 
Math.pow(mouseY oY2))/5;
mtr.appendRotation(rotDegrees resVectormesh.pivotPoint);
matrix3D.append(mtr);
matrix3D.position=cube.transform.position;
mesh.transform=matrix3D;
oX mouseX;
oY mouseY
   

Dasher, Newbie
Posted: 19 October 2011 10:11 PM   Total Posts: 8   [ # 1 ]

I get the same problem in away3d4.0. Changing pivot point of an object doesn’t rotate around the new pivot point.

   

M4TH76, Newbie
Posted: 21 October 2011 07:39 PM   Total Posts: 3   [ # 2 ]

Same here, any idea how to fix that?

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X