The forums have permanently moved to This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.

Results 1 to 2 of 2

Thread: matrix3D rotation being odd.

  1. #1

    matrix3D rotation being odd.

    Hello, I'm trying to make a "room" in flash in which you can "move" around in.
    I set up the room with flash cs4 3d functionality.

    (use arrows)

    Rotation of the camera moves the room along X and Y axis.

    var startX:int=room.x;
    var startY:int=room.y;
    var startZ:int=room.z;
    function keyDownHandler(event:KeyboardEvent):void {
        var curX:int=room.x;
        var curY:int=room.y;
        var curZ:int=room.z;
        var cameraX:int=curX-startX;
        var cameraY:int=curY-startY;
        var cameraZ:int=curZ-startZ;
        trace(cameraX+" "+cameraY+" "+cameraZ);
        if (event.keyCode==Keyboard.LEFT) {     
            room.transform.matrix3D.appendRotation(10, Vector3D.Y_AXIS, new Vector3D(cameraX+startX,cameraY+startY,cameraZ+startZ));
        if (event.keyCode==Keyboard.RIGHT) {
            room.transform.matrix3D.appendRotation(-10, Vector3D.Y_AXIS, new Vector3D(cameraX+startX,cameraY+startY,cameraZ+startZ));
        if (event.keyCode==Keyboard.UP) {
        if (event.keyCode==Keyboard.DOWN) {

    Thanks for your time and expertise.
    Last edited by Synn; November 4th, 2009 at 11:19 PM.

  2. #2
    Bump, anyone out there?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Home About Meet the Moderators Advertise

 Link to Us


Copyright 1999 - 2012