private function onObjLoadSucces(e:Loader3DEvent):void
{
this.object3D = e.loader.handle;
this.object3D.x = this.object3D.y = this.object3D.z = 0;
}
this code comes I would bet from the doc.
the x, y and z props set in this example are I think the answer to your
question.
note that in the doc the example sets them to 0. Its just to show you that you
can affect
the Object3D (the e.loader.handle) position.
So if you change in your code the position before its loaded
the above code resets to 0,0,0
Fabrice
On Feb 25, 2010, at 4:23 PM, Irati wrote:
> Hi!
>
> I have loaded am OBJ file like this:
>
> private function loadObjectFileObj(url:String):void
> {
> loader = Obj.load(url);
> this.view3D.scene.addChild(loader);
> loader.scale(30);
> loader.addOnSuccess(onObjLoadSucces);
>
> }
>
> private function onObjLoadSucces(e:Loader3DEvent):void
> {
> this.object3D = e.loader.handle;
> this.object3D.x = this.object3D.y = this.object3D.z = 0;
> }
>
> Then I have tried to move the loaded model with this code, for
> example:
>
> loader.y = 50;
> loader.moveTo(0,200,0);
>
> But the model's position doesn't change at all. Am I doing something
> wrong? Should I change something else?
>
> Sorry if this is an stupid question but I can not find the answer
> anywhere.
>
> Thanks in advance