shape changes can actually be done the easy way with the NormalUVModifier
without actually redo the mesh.
As3mod library also offer pretty cool options for this.

for face generation, look into primitives package.

Fabrice

On Jan 22, 2009, at 12:14 AM, Manic wrote:


Thanks for the reply,

I've had a good look at the geometry class (mainly due to being thrown
into it by errors) and can't really make heads nor tails of it.

The addFace function still requires a face to function (unless i'm
missing something fundamental) and its creating the extraneous face
objects which is giving me my memory leak.

I thought about simply scrolling the texture, but as the shape of the
tunnel itself changes, it would give a different effect... wouldn't
it? (I may try that tomorrow just in case actually).

The moving the faces thing sounds difficult, also I've tried updating
the properties of a face and its given me lots of errors, I was
probably doing something wrong though.

Cheers

Martin

On Jan 21, 10:13 pm, Fabrice <[email protected]> wrote:
Hi Martin,
Take a look at the way it's done in Geometry class.

Looking at your demo, why don't you just move the faces behind cam to
front instead of making new ones?
then you do not need to build new faces... no need to clear them...
You also can do this by just "scrolling" the map with the
TransformBitmapMaterial.
No mesh update required. Only if the objects are not moving in space
of course.

Fabrice
On Jan 21, 2009, at 10:45 PM, Manic wrote:



Hi, first of all introduction;

I'm a graphic designer/coder based in Sheffield and I'm really
enjoying getting into Away3d.

enough about me, more about my problems ;)

I'm creating a game where the player travels through a continuous
randomly created tunnel. To do this I'm creating new faces and then
using the add face command to create new sections to the tunnel. the
problem is that this is creating loads of new face objects that I
can't seem to remove from memory properly, thus I'm creating a memory
leak.

the demo is here;
http://www.10thplanet-clients.com/bin-release/Hacker.html

and the code is here;http://www.10thplanet-clients.com/bin-release/srcview/

(the offending code is at hack.Tunnel)

I've tried just about everything I can think of and find online with
no luck.

If anyone can point me in the right direction I'd be eternally
grateful.

Cheers

Martin

Reply via email to