Women in Technology

Hear us Roar



Article:
  ActionScript for Non-Coders
Subject:   Action Script camera
Date:   2004-08-28 21:53:45
From:   MC_Booga
I was messing around with the camera, and I found that you could not do camera rotations with it. I tried to make it so that it would, but so far I've been somewhat unsuccessful. I can get the scene to rotate, but it only rotates at the (0,0) coordinates on the stage and the scaling weirds out. I cant figure out what to do to make it work, and all my attempts have not worked out very well.


This is what I've added to the camControl function:

r = this._rotation;
_parent._rotation = -this._rotation;
_parent._x += sX*(r/180);
_parent._y += sY*(r/180);
/* this should be moving the stage so that when it rotates, it's moved to the center of the stage instead of flying around the upper left corner. It works a little, but weirds out when the rotation variable wraps around to -180. */

Full Threads Oldest First

Showing messages 1 through 2 of 2.

  • camera rotation
    2005-11-04 04:58:03  radja [View]

    hi !

    i tryed this code for camera rotation but it's weird ! doesn't work :-(

    where do i need to put this code ?

    it could a very good stuff to add to this wonderful tool !

    thx
    • Great Job
      2006-07-22 09:36:05  Anonymou$ [View]

      Nice work guys!