How to rotate a plane with material bitmap?

Software: Away3D 3.x

FJW, Newbie
Posted: 01 February 2013 05:56 PM   Total Posts: 20

Hi Guys
Could anyone help me with this please. Its a Gates class that will render a gate and open it for my website. The plane with bitmap displays but I can’t get it to rotate on its Y axis.
Would appreaciate and help.
best Frederick

package
{
import away3d.materials.BitmapMaterial;
import away3d.core.utils.Cast;
import away3d.sprites.Sprite3D;
import away3d.core.base.Mesh;
import away3d.containers.View3D;
import away3d.core.base.Object3D;
import away3d.primitives.Plane;

import flash.display.Sprite;
import flash.display.Stage;
import flash.events.KeyboardEvent;
import flash.events.MouseEvent;
import flash.geom.Vector3D;
import com.greensock.TweenLite;


  public class Gates
  {
    private var _thestage:Stage;
  private var _thecamera:Object3D;
  private var _theview:View3D;
 
  private var GateXpos:int;
  private var GateYpos:int;
  private var GateZpos:int;
  private var GateScaling:Number;

 
  //png file as Sprite3D object
  [Embed(source=“images/Gate1.png”)]
  private var mGate1:Class;
 
      public function Gates(view,camera,stage)
      {
        _theview=view;
      _thecamera=camera;
      _thestage=stage;
      }

      public function makeGate()
{
   
var GatePlane:Plane = new Plane();
GatePlane.material= new BitmapMaterial (Cast.bitmap(mGate1));
GatePlane.yUp = false;
//GatePlane.rotationY = 90;
GatePlane.width = 30;
GatePlane.height = 30;
GatePlane.x = 30;
GatePlane.z = 108;
_theview.scene.addChild(GatePlane);
 
  }
 
private function openGate()
{
//TweenLite
}
 
 
  }//End Class
}//End package


   

FJW, Newbie
Posted: 01 February 2013 06:11 PM   Total Posts: 20   [ # 1 ]

Solved, simply had to use += 90 instead of = 90.
Apologies but it may help someone.
F

   

jamescmc, Newbie
Posted: 28 February 2014 08:58 AM   Total Posts: 2   [ # 2 ]

Advanced bitmap image processing functions are included in this imaging SDK such as rotating an image / page, inserting and deleting a picture or document page, etc.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X