Dynamic Elevation (Height map) Broomstick

Software: Away3D 4.x

Felix af Ekenstam, Newbie
Posted: 20 October 2011 02:57 PM   Total Posts: 7

Hi,

How do I update my Elevation Object when I change the bimapdata of its height map?

I noticed that getHeightAtPosition() updates to the values of the new bitmap, but the Elevation still looks the same..

Or should I use some other technique to achieve dynamic height maps?

   

Durss, Newbie
Posted: 24 October 2011 09:22 AM   Total Posts: 1   [ # 1 ]

Personnaly i added necessary methods on the Elevation class to be able to update it externally.
I don’t remember exactly what i’ve done but to update it i now call an “updateGeometry” method that does this internaly :
  public function updateGeometry() : void
  {
  buildGeometry();
  _geomDirty = false;
  }

Maybe this method already exists but is private, i don’t remember.

   

inSertCodE, Sr. Member
Posted: 15 November 2011 12:36 AM   Total Posts: 105   [ # 2 ]

You’re right, it already exists…

Go to elevation.as and change

private function updateGeometry() 
to
public function updateGeometry()

then on the render after you change the parameters call
_elevation.updateGeometry();

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X