Having issues with as3dmod bend on an imported mesh.

13 views
Skip to first unread message

NickBee

unread,
Mar 12, 2011, 1:46:27 PM3/12/11
to Away3D.dev
Hey guys. A few weeks ago I was experimenting with bending primitives
and the as3dmod class:
http://www.nickbee.com/bend

All worked well and now I'm trying to replicate my results with loaded
3dObjects from Prefab.

I'm importing my objects from as files like so:

var _bendRight:Mesh;
var modStackRight:ModifierStack;
var bendRight:Bend;


//bendRight
_bendRight = new R_prongMid(_loaderScale);//R_prongMid.as class is the
imported(Outputed from prefab)
_bendRight.scale(_loaderScale);
_bendRight.y = 110;
_bendRight.x = 0;
_container.addChild(_bendRight);

//bend modifier
modStackRight = new ModifierStack(new LibraryAway3d(), _bendRight);


bendRight = new Bend(0,0);
bendRight.offset = 0; // top or bottom 0 to 1
modStackRight.addModifier(bendRight);


bendRight.force = .6;

modStackRight.apply();




No errors are being kicked back but my object is not bending at all.
If I replace my imported mesh with a cylinder primitive things bend as
expected.

Any ideas?
THANKS!

NickBee

unread,
Mar 14, 2011, 3:59:19 PM3/14/11
to Away3D.dev
Does anyone know of an example of using as3dmod to bend an object
imported from prefab in away3D. The only examples I could find of
bending was with primitives.
Thanks!

NickBee

unread,
Mar 15, 2011, 2:38:47 PM3/15/11
to Away3D.dev
Thanks to Fabrice on another post it looks like I have a lead to go
on. He mentioned that I need to be sure the the as file that prefab
generates extends mesh and not ObjectContainer3D. After a quick check
my object's as file does indeed extend ObjectContainer3D. Is there a
setting in prefab that exports the class extending mesh? Or is this a
change that needs to be done after prefab makes the as file?

Thanks!

Fabrice3D

unread,
Mar 15, 2011, 6:19:57 PM3/15/11
to away3...@googlegroups.com
if you use classes from prefab, you can access every mesh with class.meshes array
if you use awd, just parse the children till you find your mesh.

Fabrice

NickBee

unread,
Mar 15, 2011, 5:19:31 PM3/15/11
to Away3D.dev
OK, I think I have it figured out!!!!!

if you click Selected object when you export to away3D the class will
extend mesh. And that bends with no problems using AS3dMod!!!

Thanks for the direction Fabrice!

Good times!
Reply all
Reply to author
Forward
0 new messages