removeChild - another way?

Software: Away3D 3.x

Tempy111, Sr. Member
Posted: 11 January 2016 02:43 PM   Total Posts: 133

For some reason, I found when I removed a object via ‘removeChild’, it created graphic problems for the layer that object was located on.

To combat this, I’ll be just moving the object to a point offscreen where it won’t be noticed but I don’t really think that it is a very good method. just a quick fix.

I wonder if there is anything else i need to do first before I can removeChild?

   

Tempy111, Sr. Member
Posted: 25 January 2016 10:21 PM   Total Posts: 133   [ # 1 ]

Still working on this bit, but been sidetracked..

I did wonder about removing the object from the spritesession layer BEFORE removing it from the scene but no-go.. there is a add to the sprite session but no remove.. clearing it all and reading the others might be a bit.. stupid too..

Temporary fix is okay but I don’t like it in the long run.. Looking at the code for the SpriteSessions.as file seams to say a remove function is possible.. maybe.. i’ll have to try that..

   

rdoi, Member
Posted: 26 January 2016 05:30 PM   Total Posts: 86   [ # 2 ]

So, what would be the context of this question?

Are you having problems to remove a mesh from its ObjectContainer3D?

What does this “sprite” have to do with Away3D?

   

Tempy111, Sr. Member
Posted: 26 January 2016 05:57 PM   Total Posts: 133   [ # 3 ]

Sprite Session

Okay, I’ll explain a bit more/better..

MD2 meshs are loaded and added to the scene. They are (depending on mesh) added to a Set SpriteSession. A SpriteSession (along with Other Sprite functions) are part of Away3D.

The page for the API reference on SpriteSessions is here:
http://www.away3d.com/livedocs/3.6.0_lib/away3d/core/session/SpriteSession.html

now, When I remove a Mesh from the scene via removeChild, It appears all the other meshs in the SpriteSession seam to freeze graphically, while ones which aren’t part of it, are still fine.

Due to… reasons, I’ve not put as much focus into this right now as I should, but i’m wondering and I’ll have to see bout, removing the mesh from the SpriteSession before I removeChild. this cannot be done via removeChild

   

rdoi, Member
Posted: 27 January 2016 01:17 PM   Total Posts: 86   [ # 4 ]

Sorry, I didn’t realized you are dealing with v3.x series.
I worked with it a long time ago and I am afraid can’t help you with it now.

   

Tempy111, Sr. Member
Posted: 27 January 2016 01:18 PM   Total Posts: 133   [ # 5 ]

^_^ no problem. I remember to tag the Topic with the version number but it’s pretty small in the forum’s display so i’ll have to see able adding the prefix to the Topic names in future like some forums do.

No problem at all.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X