I'm loading an exported 3dmodel from Flare3d successfully into Flash. I'm able to trace the "name" of the different parts of the model with a MouseCollision()
.
The goal:
extract all the model parts names/part number dynamically without the mousecollision.
*I would like to retrieve the same data before the model is added to the stage.
I expect to output all the 3d model's parts names to then manipulate the data for my application use. I want to do this dynamically for ease of updates to the 3d models.
I have traced the main scene: Scene3D which I'm using the
scene = new Viewer3D(this)
.
the output returns [object Camera3D], [object Flare3DLoader]
This is what is currently working only with a mousecollision:
private function updateEvent(e: Event): void {
if (mouse.test(Input3D.mouseX, Input3D.mouseY)) {
// get access to the first and closest collision.
var over: Pivot3D = mouse.data[0].mesh;
if (over != last) {
// name of 3d part is traced.
trace("mouse in", over.name);
}
over.rotateY(10);
last = over;
Mouse.cursor = MouseCursor.BUTTON;
} else {
if (last) {
trace("mouse out", last.name);
}
last = null;
Mouse.cursor = MouseCursor.AUTO;
}
}